From 38cbeedeb7dc94c95482343e547addc1748344b0 Mon Sep 17 00:00:00 2001 From: Jaromir Capik Date: Thu, 2 Jan 2014 18:21:31 +0100 Subject: [PATCH] library: fixing uninitialized variable 'pos' in whattime.c --- proc/whattime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proc/whattime.c b/proc/whattime.c index 9d6abb30..eb345fb1 100644 --- a/proc/whattime.c +++ b/proc/whattime.c @@ -58,6 +58,8 @@ char *sprint_uptime(int human_readable) { realtime = localtime(&realseconds); pos = sprintf(buf, " %02d:%02d:%02d ", realtime->tm_hour, realtime->tm_min, realtime->tm_sec); + } else { + pos = 0; } /* read and calculate the amount of uptime */ -- 2.40.0