]> git.proxmox.com Git - mirror_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:18:35 +0000 (00:18 -0400)
non-functional changes

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

index 4fc2895577ea665faef14f93aaa3a1d395c7eff6..3ccb73311062f5fde006bf66bb1ebcdb03ffe761 100644 (file)
@@ -1142,7 +1142,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;
@@ -1256,15 +1256,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);
@@ -1281,9 +1277,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");