summaryrefslogtreecommitdiffhomepage
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)
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);
#endif
#endif
typedef struct {
- int pid;
+ pid_t pid, ppid;
char user[9];
char state[4];
unsigned long rss;
- int ppid;
#ifdef CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
unsigned pcpu;
unsigned pscpu;
@@ -518,8 +517,8 @@ typedef struct {
char short_cmd[COMM_LEN];
} procps_status_t;
procps_status_t* procps_scan(int save_user_arg0);
-long *find_pid_by_name( const char* pidName);
-long *pidlist_reverse(long *pidList);
+pid_t *find_pid_by_name(const char* procName);
+pid_t *pidlist_reverse(pid_t *pidList);
extern const char bb_uuenc_tbl_base64[];