library: with valgrind help, fix faulty meminfo assign

Not sure how this one has gone unnoticed until now but
with valgrind's help it's going bye-bye lickety-split.

Reference(s):
==26533== Conditional jump or move depends on uninitialised value(s)
==26533==    at 0x4E4082B: procps_meminfo_stack_fill (meminfo.c:408)

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2015-09-08 00:00:00 -05:00 committed by Craig Small
parent 88daa89883
commit 836c134579

View File

@ -405,7 +405,7 @@ PROCPS_EXPORT int procps_meminfo_stack_fill (
if (info == NULL || stack == NULL || stack->head == NULL) if (info == NULL || stack == NULL || stack->head == NULL)
return -EINVAL; return -EINVAL;
if ((rc == procps_meminfo_read(info)) < 0) if ((rc = procps_meminfo_read(info)) < 0)
return rc; return rc;
return procps_meminfo_getstack(info, stack->head); return procps_meminfo_getstack(info, stack->head);