From 2f72ad44fca689d3e0f4574e59e551443c406717 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Jul 2020 14:28:37 +0200 Subject: checksrc: ban gmtime/localtime They're not thread-safe so they should not be used in libcurl code. Explictly enabled when deemed necessary and in examples and tests Reviewed-by: Nicolas Sterchele Closes #5732 --- tests/server/util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/server') diff --git a/tests/server/util.c b/tests/server/util.c index 8e76f0c9b..dccce596b 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -119,6 +119,7 @@ void logmsg(const char *msg, ...) known_offset = 1; } sec = epoch_offset + tv.tv_sec; + /* !checksrc! disable BANNEDFUNC 1 */ now = localtime(&sec); /* not thread safe but we don't care */ msnprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld", -- cgit v1.2.1