From ce0286daca42221f8d4952def6ae437ec584ee4a Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 31 May 2022 22:03:22 +1000 Subject: [PATCH] library: clear rc in procps_loadavg again During the changes to procps_loadavg I didn't set the initial value for retval, meaning it was a random number. It is now correctly intialised to zero. References: commit 8fcd14de18b998647ba47f5b35feb1d85e2d2f08 --- proc/sysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/sysinfo.c b/proc/sysinfo.c index a863020d..311696e6 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -92,7 +92,7 @@ PROCPS_EXPORT int procps_loadavg( { double avg_1=0, avg_5=0, avg_15=0; locale_t tmplocale; - int retval; + int retval=0; FILE *fp; if ((fp = fopen(LOADAVG_FILE, "r")) == NULL)