From dd4ad068bc4ab09f7797d75ae6b9f75ee63e5fab Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 12 Jul 2018 17:49:30 +0200 Subject: [PATCH] coverity: #1437936 Unchecked return value Signed-off-by: Christian Brauner --- src/lxc/attach.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 53deb0f406..b873c6fc3b 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -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)