diff --git a/proc/whattime.c b/proc/whattime.c index f55f3636..c223cad6 100644 --- a/proc/whattime.c +++ b/proc/whattime.c @@ -38,7 +38,7 @@ #include "whattime.h" #include "sysinfo.h" -static char buf[128]; +static char buf[256]; static double av[3]; char *sprint_uptime(int human_readable) { @@ -60,6 +60,7 @@ char *sprint_uptime(int human_readable) { realtime->tm_hour, realtime->tm_min, realtime->tm_sec); } else { pos = 0; + buf[0] = '\0'; } /* read and calculate the amount of uptime */