]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
commands: move declaration into tighter scope
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 17 Feb 2019 13:21:09 +0000 (14:21 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 17 Feb 2019 13:21:09 +0000 (14:21 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/commands.c

index b80e39eb4160bb3473cb2e9118a5f611a24031c2..2d99e1580574d2c04e65e9b8116c85ff14b849ca 100644 (file)
@@ -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;