Cast the return value of fcntl() to void when setting FD_CLOEXEC.

Coverity CID 104063, 104064, 104069, 104070, 104071, 104072, 104073, 104074
This commit is contained in:
Todd C. Miller
2016-05-05 16:16:24 -06:00
parent 9471ec45a1
commit 6473d55aa7
6 changed files with 12 additions and 12 deletions

View File

@@ -843,7 +843,7 @@ fork_pty(struct command_details *details, int sv[], sigset_t *omask)
close(sv[0]);
close(signal_pipe[0]);
close(signal_pipe[1]);
fcntl(sv[1], F_SETFD, FD_CLOEXEC);
(void)fcntl(sv[1], F_SETFD, FD_CLOEXEC);
sigprocmask(SIG_SETMASK, omask, NULL);
/* Close the other end of the stdin/stdout/stderr pipes and exec. */
if (io_pipe[STDIN_FILENO][1])
@@ -1380,7 +1380,7 @@ exec_monitor(struct command_details *details, int backchannel)
close(signal_pipe[0]);
close(signal_pipe[1]);
close(errpipe[0]);
fcntl(errpipe[1], F_SETFD, FD_CLOEXEC);
(void)fcntl(errpipe[1], F_SETFD, FD_CLOEXEC);
restore_signals();
/* setup tty and exec command */