library: fixing uninitialized variable 'pos' in whattime.c

This commit is contained in:
Jaromir Capik 2014-01-02 18:21:31 +01:00
parent 8a38cd5eb4
commit 38cbeedeb7

View File

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