From 44608e9693b03661fbab5e27650bb040c6871d11 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 22 Oct 2002 12:21:15 +0000 Subject: Patch last_pach62 from vodz. This patch moves all the /proc parsing code into libbb so it can be shared by ps, top, etc, saving over 1.5k. --- procps/kill.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'procps/kill.c') diff --git a/procps/kill.c b/procps/kill.c index 2ef87aea6..cf5c412a8 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -127,7 +127,7 @@ do_it_now: long* pidList; pidList = find_pid_by_name(*argv); - if (!pidList || *pidList<=0) { + if (*pidList <= 0) { errors++; if (quiet==0) error_msg( "%s: no process killed", *argv); @@ -142,9 +142,7 @@ do_it_now: } } } - /* Note that we don't bother to free the memory - * allocated in find_pid_by_name(). It will be freed - * upon exit, so we can save a byte or two */ + free(pidList); argv++; } } -- cgit v1.2.3