]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
git: update to v2.2.1
[ps-cgit] / ui-repolist.c
index c2bcce177c23da9dabf9f5becbec3c71a0abc3c0..49c991f616a74a5fdf24f4c0c65d959c88275378 100644 (file)
@@ -17,16 +17,17 @@ static time_t read_agefile(char *path)
        time_t result;
        size_t size;
        char *buf;
-       static char buf2[64];
+       struct strbuf date_buf = STRBUF_INIT;
 
        if (readfile(path, &buf, &size))
                return -1;
 
-       if (parse_date(buf, buf2, sizeof(buf2)) > 0)
-               result = strtoul(buf2, NULL, 10);
+       if (parse_date(buf, &date_buf) == 0)
+               result = strtoul(date_buf.buf, NULL, 10);
        else
                result = 0;
        free(buf);
+       strbuf_release(&date_buf);
        return result;
 }