]> git.proxmox.com Git - mirror_lxc.git/commitdiff
coverity: #1435805
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 26 May 2018 01:21:05 +0000 (03:21 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 26 May 2018 01:21:05 +0000 (03:21 +0200)
Logically dead code

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 1910e23a69ad3e3e4030552fca64b2d03e5c2e02..828ebb8e54d7d22bdf39ebd968bfded133b3ba0a 100644 (file)
@@ -2041,11 +2041,8 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout)
        }
        TRACE("Sent signal %d to pid %d", haltsignal, pid);
 
-       if (timeout == 0) {
-               if (state_client_fd >= 0)
-                       close(state_client_fd);
+       if (timeout == 0)
                return true;
-       }
 
        ret = lxc_cmd_sock_rcv_state(state_client_fd, timeout);
        close(state_client_fd);