start: simplify gotos

parent f15b126e
...@@ -2051,30 +2051,28 @@ int __lxc_start(struct lxc_handler *handler, struct lxc_operations *ops, ...@@ -2051,30 +2051,28 @@ int __lxc_start(struct lxc_handler *handler, struct lxc_operations *ops,
if (error_num) if (error_num)
*error_num = handler->exit_status; *error_num = handler->exit_status;
/* These are not the droids you are looking for. */
__private_goto1:
lxc_delete_network(handler); lxc_delete_network(handler);
__private_goto2:
detach_block_device(handler->conf); detach_block_device(handler->conf);
__private_goto3:
lxc_end(handler); lxc_end(handler);
return ret; return ret;
/* These are the droids you are looking for. */
out_abort: out_abort:
lxc_abort(handler); lxc_abort(handler);
goto __private_goto3; lxc_end(handler);
return ret;
out_detach_blockdev: out_detach_blockdev:
lxc_abort(handler); lxc_abort(handler);
goto __private_goto2; detach_block_device(handler->conf);
lxc_end(handler);
return ret;
out_delete_network: out_delete_network:
lxc_abort(handler); lxc_abort(handler);
goto __private_goto1; lxc_delete_network(handler);
detach_block_device(handler->conf);
lxc_end(handler);
return ret;
} }
struct start_args { struct start_args {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment