]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: remove dead variable
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 9 Sep 2017 09:23:55 +0000 (11:23 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 24 Sep 2017 04:36:59 +0000 (00:36 -0400)
non-functional changes

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

index 045512f53c3130c8bcef49360e7882f08a06beaa..5d4596adfd9b88745542f0fa48ec89854a1cc493 100644 (file)
@@ -1207,7 +1207,7 @@ static int lxc_spawn(struct lxc_handler *handler)
        bool wants_to_map_ids;
        int saved_ns_fd[LXC_NS_MAX];
        struct lxc_list *id_map;
-       int failed_before_rename = 0, preserve_mask = 0;
+       int preserve_mask = 0;
        bool cgroups_connected = false;
 
        id_map = &handler->conf->id_map;
@@ -1321,15 +1321,11 @@ static int lxc_spawn(struct lxc_handler *handler)
                goto out_delete_net;
        }
 
-       if (lxc_sync_wake_child(handler, LXC_SYNC_STARTUP)) {
-               failed_before_rename = 1;
+       if (lxc_sync_wake_child(handler, LXC_SYNC_STARTUP))
                goto out_delete_net;
-       }
 
-       if (lxc_sync_wait_child(handler, LXC_SYNC_CONFIGURE)) {
-               failed_before_rename = 1;
+       if (lxc_sync_wait_child(handler, LXC_SYNC_CONFIGURE))
                goto out_delete_net;
-       }
 
        if (!cgroup_create_legacy(handler)) {
                ERROR("Failed to setup legacy cgroups for container \"%s\".", name);
@@ -1346,9 +1342,6 @@ static int lxc_spawn(struct lxc_handler *handler)
        if (!cgroup_chown(handler))
                goto out_delete_net;
 
-       if (failed_before_rename)
-               goto out_delete_net;
-
        handler->netnsfd = lxc_preserve_ns(handler->pid, "net");
        if (handler->netnsfd < 0) {
                ERROR("Failed to preserve network namespace");