mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 14:10:19 +00:00
Compare commits
5 commits
e7df92b2b5
...
dba3f156ff
Author | SHA1 | Date | |
---|---|---|---|
|
dba3f156ff | ||
|
805cd550f2 | ||
|
a4091189b0 | ||
|
9d3498f01e | ||
|
afcff5da2b |
3 changed files with 231 additions and 189 deletions
|
@ -161,7 +161,9 @@ char *get_local_dir(const char *url, const char *branch)
|
|||
static char *move_local_cache(struct git_info *info)
|
||||
{
|
||||
char *old_path = get_local_dir(info->url, info->branch);
|
||||
return move_away(old_path);
|
||||
char *new_path = move_away(old_path);
|
||||
free(old_path);
|
||||
return new_path;
|
||||
}
|
||||
|
||||
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 */
|
||||
if (battery_start.volt1) {
|
||||
size_t stringsize = snprintf(NULL, 0, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1) + 1;
|
||||
char *ptr = malloc(size);
|
||||
char *ptr = malloc(stringsize);
|
||||
|
||||
if (ptr) {
|
||||
snprintf(ptr, stringsize, "%dmV (%d%%)", battery_start.volt1, battery_start.percent1);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue