aboutsummaryrefslogtreecommitdiffstats
path: root/cache.c
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2022-05-01 11:08:26 +0200
committerFlorian Pritz <bluewind@xinu.at>2022-05-01 11:08:26 +0200
commit4f1bc7f9aa57da2ca84b475d472e23e22cc41e95 (patch)
tree37e7aec5ddc583047da1126ffdc41a81f20cf1f6 /cache.c
parent2cbdd90e0f8575eda6486b4bb06521d848eaa307 (diff)
parent5258c297ba6fb604ae1415fbc19a3fe42457e49e (diff)
downloadcgit-local.tar.gz
cgit-local.tar.xz
Merge remote-tracking branch 'jason/master' into localHEADlocal
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cache.c b/cache.c
index 2c70be7..55199e8 100644
--- 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;
}