mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Compare commits
1 commit
dba3f156ff
...
e7df92b2b5
Author | SHA1 | Date | |
---|---|---|---|
|
e7df92b2b5 |
2 changed files with 2 additions and 4 deletions
|
@ -161,9 +161,7 @@ char *get_local_dir(const char *url, const char *branch)
|
||||||
static char *move_local_cache(struct git_info *info)
|
static char *move_local_cache(struct git_info *info)
|
||||||
{
|
{
|
||||||
char *old_path = get_local_dir(info->url, info->branch);
|
char *old_path = get_local_dir(info->url, info->branch);
|
||||||
char *new_path = move_away(old_path);
|
return move_away(old_path);
|
||||||
free(old_path);
|
|
||||||
return new_path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_clean(const char *path, unsigned int status, void *payload)
|
static int check_clean(const char *path, unsigned int status, void *payload)
|
||||||
|
|
|
@ -2261,7 +2261,7 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size, struct divelog *log)
|
||||||
/* Recording the starting battery status to extra data */
|
/* Recording the starting battery status to extra data */
|
||||||
if (battery_start.volt1) {
|
if (battery_start.volt1) {
|
||||||
size_t stringsize = snprintf(NULL, 0, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1) + 1;
|
size_t stringsize = snprintf(NULL, 0, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1) + 1;
|
||||||
char *ptr = malloc(stringsize);
|
char *ptr = malloc(size);
|
||||||
|
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
snprintf(ptr, stringsize, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1);
|
snprintf(ptr, stringsize, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue