library: fixing uninitialized variable 'pos' in whattime.c
This commit is contained in:
1 parent
8a38cd5eb4
commit
38cbeedeb7
1 file changed
+2
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user