diff svr-session.c @ 618:b5cc8878d5ec

Properly fix the bug found years ago by Klocwork, refound again.
author Matt Johnston <matt@ucc.asn.au>
date Thu, 07 Apr 2011 13:33:26 +0000
parents a98a2138364a
children 0ad95abf8d3c
line wrap: on
line diff
--- a/svr-session.c	Thu Apr 07 13:25:00 2011 +0000
+++ b/svr-session.c	Thu Apr 07 13:33:26 2011 +0000
@@ -205,7 +205,7 @@
 		local_tm = localtime(&timesec);
 		if (local_tm == NULL
 			|| strftime(datestr, sizeof(datestr), "%b %d %H:%M:%S", 
-						localtime(&timesec)) == 0)
+						local_tm) == 0)
 		{
 			/* upon failure, just print the epoch-seconds time. */
 			snprintf(datestr, sizeof(datestr), "%d", (int)timesec);