From a579fa51bf9e65aa5a1f12d3a73860b7fc89fc89 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 26 May 2018 03:20:36 +0200 Subject: [PATCH] coverity: #1435806 Logically dead code Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 2a8066767..1910e23a6 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1971,11 +1971,8 @@ static bool do_lxcapi_reboot2(struct lxc_container *c, int timeout) } TRACE("Sent signal %d to pid %d", rebootsignal, 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);