Properly fix the bug found years ago by Klocwork, refound again.

--HG--
extra : convert_revision : 65b95facde07c748c56e0bfa25c801397dc16a99
This commit is contained in:
Matt Johnston 2011-04-07 13:33:26 +00:00
parent 22c16a8b71
commit b272b967e2

View File

@ -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);