summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2011-04-07 13:33:26 +0000
committerMatt Johnston <matt@ucc.asn.au>2011-04-07 13:33:26 +0000
commitb272b967e24285d7330f189503455fbefcc7fde0 (patch)
tree21c20ad89dfda9485aae6b719f1260961f485750
parent22c16a8b71d6ba3d5dc9c4ec1343c9abceb38837 (diff)
Properly fix the bug found years ago by Klocwork, refound again.
--HG-- extra : convert_revision : 65b95facde07c748c56e0bfa25c801397dc16a99
-rw-r--r--svr-session.c2
1 files changed, 1 insertions, 1 deletions
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(&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);