From: Ralph Corderoy Date: Mon, 28 Aug 2017 16:53:15 +0000 (+0100) Subject: Don't cast zero to pid_t for setpgid(2)'s first argument. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/78290c874170b39a1f87d1dcbd80d03fa6a6ab05 Don't cast zero to pid_t for setpgid(2)'s first argument. --- diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 60d9a69b..1e28623a 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -232,7 +232,7 @@ message_fd (char **vec) if (dup2 (fd, 1) == NOTOK || dup2 (fd, 2) == NOTOK) _exit (-1); closefds (3); - setpgid ((pid_t) 0, getpid ()); /* put in own process group */ + setpgid(0, getpid()); /* put in own process group */ if (execvp (vec[0], vec) == NOTOK) { _exit (-1); } diff --git a/uip/slocal.c b/uip/slocal.c index 2bf71fab..bd751a1f 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -1085,7 +1085,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress) } #endif /* TIOCNOTTY */ - setpgid ((pid_t) 0, getpid ()); /* put in own process group */ + setpgid(0, getpid()); /* put in own process group */ *environ = NULL; setenv("USER", pw->pw_name, 1);