From 836c1345791ef90c150e52661b2e4636b29be6fc Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Tue, 8 Sep 2015 00:00:00 -0500 Subject: [PATCH] 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 --- proc/meminfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/meminfo.c b/proc/meminfo.c index a3a1060d..44dbc88b 100644 --- a/proc/meminfo.c +++ b/proc/meminfo.c @@ -405,7 +405,7 @@ PROCPS_EXPORT int procps_meminfo_stack_fill ( if (info == NULL || stack == NULL || stack->head == NULL) return -EINVAL; - if ((rc == procps_meminfo_read(info)) < 0) + if ((rc = procps_meminfo_read(info)) < 0) return rc; return procps_meminfo_getstack(info, stack->head); -- 2.40.0