From: Jim Warner Date: Sun, 23 Aug 2015 05:00:00 +0000 (-0500) Subject: top: respond to library changes regarding self lookups X-Git-Tag: v4.0.0~1068 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66cd99270debdc7a5271e5cb0ff69233c5660572;p=procps-ng 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 --- 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();