Skip to content

Commit

Permalink
coverity: #1437936
Browse files Browse the repository at this point in the history
Unchecked return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Dec 10, 2018
1 parent b789a32 commit dd4ad06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lxc/attach.c
Expand Up @@ -861,13 +861,13 @@ static int attach_child_main(struct attach_clone_payload *payload)
* may want to make sure the fds are closed, for example.
*/
if (options->stdin_fd >= 0 && options->stdin_fd != STDIN_FILENO)
dup2(options->stdin_fd, STDIN_FILENO);
(void)dup2(options->stdin_fd, STDIN_FILENO);

if (options->stdout_fd >= 0 && options->stdout_fd != STDOUT_FILENO)
dup2(options->stdout_fd, STDOUT_FILENO);
(void)dup2(options->stdout_fd, STDOUT_FILENO);

if (options->stderr_fd >= 0 && options->stderr_fd != STDERR_FILENO)
dup2(options->stderr_fd, STDERR_FILENO);
(void)dup2(options->stderr_fd, STDERR_FILENO);

/* close the old fds */
if (options->stdin_fd > STDERR_FILENO)
Expand Down

0 comments on commit dd4ad06

Please sign in to comment.