From: Christian Brauner Date: Wed, 22 Jul 2020 08:46:05 +0000 (+0200) Subject: start: simplify gotos X-Git-Tag: lxc-5.0.0~384^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=945daa24062ad6c154753b779a359aa3f8a10bff;p=thirdparty%2Flxc.git start: simplify gotos Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index da6323035..4d356af15 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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 {