diff options
| author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-01 09:16:49 +0000 |
|---|---|---|
| committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-01 09:16:49 +0000 |
| commit | 9929fc484855149072edb217da1b801f00c0fe15 (patch) | |
| tree | a97deb26bca43e394a603840039846cd9d89cae9 /include | |
| parent | 7a695ef456cfdfcd5d460681a8016ad9a1cf0833 (diff) | |
| download | busybox-w32-9929fc484855149072edb217da1b801f00c0fe15.tar.gz busybox-w32-9929fc484855149072edb217da1b801f00c0fe15.tar.bz2 busybox-w32-9929fc484855149072edb217da1b801f00c0fe15.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.
git-svn-id: svn://busybox.net/trunk/busybox@16485 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 7 |
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 |
| 503 | typedef struct { | 503 | typedef 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; |
| 520 | procps_status_t* procps_scan(int save_user_arg0); | 519 | procps_status_t* procps_scan(int save_user_arg0); |
| 521 | long *find_pid_by_name( const char* pidName); | 520 | pid_t *find_pid_by_name(const char* procName); |
| 522 | long *pidlist_reverse(long *pidList); | 521 | pid_t *pidlist_reverse(pid_t *pidList); |
| 523 | 522 | ||
| 524 | 523 | ||
| 525 | extern const char bb_uuenc_tbl_base64[]; | 524 | extern const char bb_uuenc_tbl_base64[]; |
