library: fixing uninitialized variable 'pos' in whattime.c
This commit is contained in:
parent
8a38cd5eb4
commit
38cbeedeb7
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user