]> git.cameronkatri.com Git - cgit.git/blobdiff - cache.c
git: update to v2.32.0
[cgit.git] / cache.c
diff --git a/cache.c b/cache.c
index 2c70be784d6187cb63d20475e8c6df203b6bb31f..55199e8fe555d197427b6db3c25ca655d2e7804a 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -401,12 +401,12 @@ int cache_process(int size, const char *path, const char *key, int ttl,
 static char *sprintftime(const char *format, time_t time)
 {
        static char buf[64];
-       struct tm *tm;
+       struct tm tm;
 
        if (!time)
                return NULL;
-       tm = gmtime(&time);
-       strftime(buf, sizeof(buf)-1, format, tm);
+       gmtime_r(&time, &tm);
+       strftime(buf, sizeof(buf)-1, format, &tm);
        return buf;
 }