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 8fcd14de18
This commit is contained in:
Craig Small 2022-05-31 22:03:22 +10:00
parent 3111334ddd
commit ce0286daca

View File

@ -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)