summary refs log tree commit diff
path: root/www/git.causal.agency/cgit/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'www/git.causal.agency/cgit/cache.c')
-rw-r--r--www/git.causal.agency/cgit/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/www/git.causal.agency/cgit/cache.c b/www/git.causal.agency/cgit/cache.c
index 580c0e80..578b73b0 100644
--- a/www/git.causal.agency/cgit/cache.c
+++ b/www/git.causal.agency/cgit/cache.c
@@ -408,12 +408,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;
 }