From: Christian Brauner Date: Sun, 17 Feb 2019 13:21:09 +0000 (+0100) Subject: commands: move declaration into tighter scope X-Git-Tag: lxc-3.2.0~142^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ebc7bde97503c30671f1f8892171094a7fe6101;p=thirdparty%2Flxc.git commands: move declaration into tighter scope Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index b80e39eb4..2d99e1580 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1074,7 +1074,6 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler, struct lxc_epoll_descr *descr, const lxc_cmd_t cmd) { - struct lxc_state_client *client; struct lxc_list *cur, *next; lxc_terminal_free(handler->conf, fd); @@ -1085,7 +1084,8 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler, } lxc_list_for_each_safe(cur, &handler->conf->state_clients, next) { - client = cur->elem; + struct lxc_state_client *client = cur->elem; + if (client->clientfd != fd) continue;