2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

pid_t is defined by POSIX as a signed integer type so we don't need

a cast when comparing to -1.
This commit is contained in:
Todd C. Miller
2016-05-04 14:14:38 -06:00
parent c70da6dcdf
commit 829917f008
3 changed files with 5 additions and 5 deletions

View File

@@ -137,7 +137,7 @@ mon_handler(int s, siginfo_t *info, void *context)
*/
if (s != SIGCHLD && USER_SIGNALED(info) && info->si_pid != 0) {
pid_t si_pgrp = getpgid(info->si_pid);
if (si_pgrp != (pid_t)-1) {
if (si_pgrp != -1) {
if (si_pgrp == cmnd_pgrp)
return;
} else if (info->si_pid == cmnd_pid) {