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