diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2021-03-30 19:59:13 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2021-03-30 19:59:13 +0300 |
| commit | ccd0d09e29ed887a848bd6d79bddfc218be8ecd7 (patch) | |
| tree | ba16c428ffedb167752eeda3ad9c90089baa631e /cache.c | |
| parent | d366ec1e1e796937387208ef8c26097e5ff44ae9 (diff) | |
| parent | bd6f5683f6cde4212364354b3139c1d521f40f39 (diff) | |
| download | cgit-ccd0d09e29ed887a848bd6d79bddfc218be8ecd7.tar.gz cgit-ccd0d09e29ed887a848bd6d79bddfc218be8ecd7.zip | |
Merge remote-tracking branch 'upstream/master' into git.aaoth.xyz
Diffstat (limited to 'cache.c')
| -rw-r--r-- | cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |
