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 */