diff options
Diffstat (limited to 'ui-repolist.c')
-rw-r--r-- | ui-repolist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index c2bcce1..49c991f 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -17,16 +17,17 @@ static time_t read_agefile(char *path) | |||
17 | time_t result; | 17 | time_t result; |
18 | size_t size; | 18 | size_t size; |
19 | char *buf; | 19 | char *buf; |
20 | static char buf2[64]; | 20 | struct strbuf date_buf = STRBUF_INIT; |
21 | 21 | ||
22 | if (readfile(path, &buf, &size)) | 22 | if (readfile(path, &buf, &size)) |
23 | return -1; | 23 | return -1; |
24 | 24 | ||
25 | if (parse_date(buf, buf2, sizeof(buf2)) > 0) | 25 | if (parse_date(buf, &date_buf) == 0) |
26 | result = strtoul(buf2, NULL, 10); | 26 | result = strtoul(date_buf.buf, NULL, 10); |
27 | else | 27 | else |
28 | result = 0; | 28 | result = 0; |
29 | free(buf); | 29 | free(buf); |
30 | strbuf_release(&date_buf); | ||
30 | return result; | 31 | return result; |
31 | } | 32 | } |
32 | 33 | ||