From 66cd99270debdc7a5271e5cb0ff69233c5660572 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sun, 23 Aug 2015 00:00:00 -0500 Subject: [PATCH] top: respond to library changes regarding self lookups Just in case, make the old proc_t used in the before() function static so valgrind doesn't get his panties in a bunch over the fact the 'cmd' is now dynamic memory. [ Shouldn't that function, or an equivalent, also be ] [ part of our new library's implementation? However, ] [ is it proper for a brand new library to abnormally ] [ terminate a calling process with a stderr message? ] Signed-off-by: Jim Warner --- top/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/top/top.c b/top/top.c index 29b68564..328e8009 100644 --- a/top/top.c +++ b/top/top.c @@ -2889,8 +2889,8 @@ signify_that: * No matter what *they* say, we handle the really really BIG and * IMPORTANT stuff upon which all those lessor functions depend! */ static void before (char *me) { + static proc_t p; struct sigaction sa; - proc_t p; int i; int linux_version_code = procps_linux_version();