]> git.proxmox.com Git - mirror_lxc.git/commitdiff
start: simplify gotos
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 22 Jul 2020 08:46:05 +0000 (10:46 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 22 Jul 2020 08:46:05 +0000 (10:46 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index da6323035d7ea9a155d67cf85e119c94bd4265ce..4d356af157ef1259c2cd750029a5ba75fd026e88 100644 (file)
@@ -2126,30 +2126,28 @@ int __lxc_start(struct lxc_handler *handler, struct lxc_operations *ops,
        if (error_num)
                *error_num = handler->exit_status;
 
-/* These are not the droids you are looking for. */
-__private_goto1:
        lxc_delete_network(handler);
-
-__private_goto2:
        detach_block_device(handler->conf);
-
-__private_goto3:
        lxc_end(handler);
-
        return ret;
 
-/* These are the droids you are looking for. */
 out_abort:
        lxc_abort(handler);
-       goto __private_goto3;
+       lxc_end(handler);
+       return ret;
 
 out_detach_blockdev:
        lxc_abort(handler);
-       goto __private_goto2;
+       detach_block_device(handler->conf);
+       lxc_end(handler);
+       return ret;
 
 out_delete_network:
        lxc_abort(handler);
-       goto __private_goto1;
+       lxc_delete_network(handler);
+       detach_block_device(handler->conf);
+       lxc_end(handler);
+       return ret;
 }
 
 struct start_args {