From b272b967e24285d7330f189503455fbefcc7fde0 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 7 Apr 2011 13:33:26 +0000 Subject: [PATCH] Properly fix the bug found years ago by Klocwork, refound again. --HG-- extra : convert_revision : 65b95facde07c748c56e0bfa25c801397dc16a99 --- svr-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr-session.c b/svr-session.c index 2a6bc66..77d167b 100644 --- a/svr-session.c +++ b/svr-session.c @@ -205,7 +205,7 @@ void svr_dropbear_log(int priority, const char* format, va_list param) { local_tm = localtime(×ec); if (local_tm == NULL || strftime(datestr, sizeof(datestr), "%b %d %H:%M:%S", - localtime(×ec)) == 0) + local_tm) == 0) { /* upon failure, just print the epoch-seconds time. */ snprintf(datestr, sizeof(datestr), "%d", (int)timesec);