lib: Initialise uptime variables
upminutes and uphours could both not get initialised in the procps_uptime_sprint_short() function. Error was probably introduced at the referenced commit. References: Coverity 240787 Uninitialized scalar variable Coverity 240776 Uninitialized scalar variable commit 0496b39876d569fe1cecb76ad5ef212cd14c0374 Signed-off-by: Craig Small <csmall@dropbear.xyz>
This commit is contained in:
parent
2e0e865ca5
commit
10824b0655
@ -151,7 +151,7 @@ PROCPS_EXPORT char *procps_uptime_sprint(void)
|
||||
*/
|
||||
PROCPS_EXPORT char *procps_uptime_sprint_short(void)
|
||||
{
|
||||
int updecades, upyears, upweeks, updays, uphours, upminutes;
|
||||
int updecades, upyears, upweeks, updays, uphours, upminutes = 0;
|
||||
int pos = 3;
|
||||
int comma = 0;
|
||||
double uptime_secs, idle_secs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user