kopia lustrzana https://github.com/Hamlib/Hamlib
Fix compile warnings for tests
rodzic
1e883d0195
commit
abca0653fd
|
@ -378,13 +378,11 @@ int main(int argc, char *argv[])
|
||||||
fprintf(stderr, "Warning: %s is not a directory!\n", hist_dir);
|
fprintf(stderr, "Warning: %s is not a directory!\n", hist_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
hist_path = (char *)calloc((sizeof(char)
|
int hist_path_size = sizeof(char)*(strlen(hist_dir)+strlen(hist_file) + 1);
|
||||||
* (strlen(hist_dir)
|
hist_path = (char *)calloc(hist_path_size, sizeof(char));
|
||||||
+ strlen(hist_file) + 1)),
|
|
||||||
sizeof(char));
|
snprintf(hist_path, hist_path_size, "%s%s", hist_dir, hist_file);
|
||||||
|
|
||||||
strncpy(hist_path, hist_dir, strlen(hist_dir));
|
|
||||||
strncat(hist_path, hist_file, strlen(hist_file));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rd_hist && hist_path)
|
if (rd_hist && hist_path)
|
||||||
|
|
Ładowanie…
Reference in New Issue