aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-01 09:16:49 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-01 09:16:49 +0000
commit35fb51272863c8723a40e59d2024c7f4c9ec8946 (patch)
treea97deb26bca43e394a603840039846cd9d89cae9 /libbb/procps.c
parentd3ada3228551e2556afb9de6d3126fd016df1fb1 (diff)
downloadbusybox-w32-35fb51272863c8723a40e59d2024c7f4c9ec8946.tar.gz
busybox-w32-35fb51272863c8723a40e59d2024c7f4c9ec8946.tar.bz2
busybox-w32-35fb51272863c8723a40e59d2024c7f4c9ec8946.zip
PID should be stored in pid_t, not int or long.
find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index eba90705c..15a1cf74b 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -32,8 +32,9 @@ static int read_to_buf(const char *filename, void *buf)
32procps_status_t * procps_scan(int save_user_arg0) 32procps_status_t * procps_scan(int save_user_arg0)
33{ 33{
34 static DIR *dir; 34 static DIR *dir;
35 struct dirent *entry;
36 static procps_status_t ret_status; 35 static procps_status_t ret_status;
36
37 struct dirent *entry;
37 char *name; 38 char *name;
38 int n; 39 int n;
39 char status[32]; 40 char status[32];