summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/libbb.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 770c1ecc1..343a93290 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -501,11 +501,10 @@ void reset_ino_dev_hashtable(void);
501#endif 501#endif
502#endif 502#endif
503typedef struct { 503typedef struct {
504 int pid; 504 pid_t pid, ppid;
505 char user[9]; 505 char user[9];
506 char state[4]; 506 char state[4];
507 unsigned long rss; 507 unsigned long rss;
508 int ppid;
509#ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE 508#ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
510 unsigned pcpu; 509 unsigned pcpu;
511 unsigned pscpu; 510 unsigned pscpu;
@@ -518,8 +517,8 @@ typedef struct {
518 char short_cmd[COMM_LEN]; 517 char short_cmd[COMM_LEN];
519} procps_status_t; 518} procps_status_t;
520procps_status_t* procps_scan(int save_user_arg0); 519procps_status_t* procps_scan(int save_user_arg0);
521long *find_pid_by_name( const char* pidName); 520pid_t *find_pid_by_name(const char* procName);
522long *pidlist_reverse(long *pidList); 521pid_t *pidlist_reverse(pid_t *pidList);
523 522
524 523
525extern const char bb_uuenc_tbl_base64[]; 524extern const char bb_uuenc_tbl_base64[];