diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-22 12:21:15 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-22 12:21:15 +0000 |
commit | 44608e9693b03661fbab5e27650bb040c6871d11 (patch) | |
tree | 4555230653cdb82d998f076b29130d8fe18a6f7a /procps/kill.c | |
parent | 1887b0478f2743ce7808e8b37462e18d584611e1 (diff) | |
download | busybox-w32-44608e9693b03661fbab5e27650bb040c6871d11.tar.gz busybox-w32-44608e9693b03661fbab5e27650bb040c6871d11.tar.bz2 busybox-w32-44608e9693b03661fbab5e27650bb040c6871d11.zip |
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.
Diffstat (limited to 'procps/kill.c')
-rw-r--r-- | procps/kill.c | 6 |
1 files changed, 2 insertions, 4 deletions
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: | |||
127 | long* pidList; | 127 | long* pidList; |
128 | 128 | ||
129 | pidList = find_pid_by_name(*argv); | 129 | pidList = find_pid_by_name(*argv); |
130 | if (!pidList || *pidList<=0) { | 130 | if (*pidList <= 0) { |
131 | errors++; | 131 | errors++; |
132 | if (quiet==0) | 132 | if (quiet==0) |
133 | error_msg( "%s: no process killed", *argv); | 133 | error_msg( "%s: no process killed", *argv); |
@@ -142,9 +142,7 @@ do_it_now: | |||
142 | } | 142 | } |
143 | } | 143 | } |
144 | } | 144 | } |
145 | /* Note that we don't bother to free the memory | 145 | free(pidList); |
146 | * allocated in find_pid_by_name(). It will be freed | ||
147 | * upon exit, so we can save a byte or two */ | ||
148 | argv++; | 146 | argv++; |
149 | } | 147 | } |
150 | } | 148 | } |