tree-wide: use pid_is_valid() at more places

This commit is contained in:
Lennart Poettering
2017-08-31 15:45:04 +02:00
parent 702b64846e
commit ee043777be
5 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ static int method_get_machine_by_pid(sd_bus_message *message, void *userdata, sd
if (r < 0)
return r;
if (pid < 0)
if (!pid_is_valid((pid_t) pid))
return -EINVAL;
if (pid == 0) {