From f689d06ca91b772c56440101e578dca21fab4daa Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 May 2006 21:39:52 +0000 Subject: make sure we pass a time_t * to localtime(), and the timeval struct members are not always time_t ones --- tests/server/util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/server/util.c') diff --git a/tests/server/util.c b/tests/server/util.c index 93905c0ec..7cecfe744 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -78,8 +78,9 @@ void logmsg(const char *msg, ...) FILE *logfp; struct timeval tv = curlx_tvnow(); + time_t sec = tv.tv_sec; struct tm *now = - localtime(&tv.tv_sec); /* not multithread safe but we don't care */ + localtime(&sec); /* not multithread safe but we don't care */ char timebuf[20]; snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld", -- cgit v1.2.3