From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 7 Jun 2020 17:22:10 +0000 (+0200)
Subject: get_clf_timestamp(): Use privoxy_gmtime_r()
X-Git-Tag: v_3_0_29~287
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/faq/user-manual/@default-cgi@show-url-info?a=commitdiff_plain;h=bbf03939e49397937cc8b10943c19a3c8ce26b0c;p=privoxy.git

get_clf_timestamp(): Use privoxy_gmtime_r()
---

diff --git a/errlog.c b/errlog.c
index 05a2c82e..8b12a436 100644
--- a/errlog.c
+++ b/errlog.c
@@ -533,15 +533,7 @@ static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
    int tz_length = 0;
 
    time (&now);
-#ifdef HAVE_GMTIME_R
-   gmt = *gmtime_r(&now, &gmt);
-#elif defined(MUTEX_LOCKS_AVAILABLE)
-   privoxy_mutex_lock(&gmtime_mutex);
-   gmt = *gmtime(&now);
-   privoxy_mutex_unlock(&gmtime_mutex);
-#else
-   gmt = *gmtime(&now);
-#endif
+   gmt = *privoxy_gmtime_r(&now, &gmt);
 #ifdef HAVE_LOCALTIME_R
    tm_now = localtime_r(&now, &dummy);
 #elif defined(MUTEX_LOCKS_AVAILABLE)