summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--scan-tree.c1
-rw-r--r--ui-repolist.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/scan-tree.c b/scan-tree.c
index cdafb02..47f3988 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -41,8 +41,9 @@ char *readfile(const char *path)
static char buf[MAX_PATH];
if (!(f = fopen(path, "r")))
return NULL;
+ buf[0] = 0;
fgets(buf, MAX_PATH, f);
fclose(f);
return buf;
}
diff --git a/ui-repolist.c b/ui-repolist.c
index 2c13d50..3aedde5 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -22,8 +22,9 @@ time_t read_agefile(char *path)
static char buf[64], buf2[64];
if (!(f = fopen(path, "r")))
return -1;
+ buf[0] = 0;
if (fgets(buf, sizeof(buf), f) == NULL)
return -1;
fclose(f);
if (parse_date(buf, buf2, sizeof(buf2)))