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:
@ -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];
|
||||
|
Reference in New Issue
Block a user