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.
This commit is contained in:
Denis Vlasenko
2006-11-01 09:16:49 +00:00
parent d3ada32285
commit 35fb512728
8 changed files with 76 additions and 69 deletions

View File

@ -32,8 +32,9 @@ static int read_to_buf(const char *filename, void *buf)
procps_status_t * procps_scan(int save_user_arg0)
{
static DIR *dir;
struct dirent *entry;
static procps_status_t ret_status;
struct dirent *entry;
char *name;
int n;
char status[32];