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