From: Zbigniew Jędrzejewski-Szmek Date: Thu, 3 Mar 2022 17:56:06 +0000 (+0100) Subject: portablectl: reorder if branches to match previous conditional in the same function X-Git-Tag: v251-rc1~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=573e33de078956ded078653ef3f90f93469b4dbf;p=thirdparty%2Fsystemd.git portablectl: reorder if branches to match previous conditional in the same function One is a ternary op, the other an normal conditional, but they should still use the same order of branches. --- diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index bc7a4ddc210..7e222870bc0 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -928,12 +928,13 @@ static int detach_image(int argc, char *argv[], void *userdata) { if (r < 0) return r; - if (!strv_isempty(arg_extension_images)) { + if (strv_isempty(arg_extension_images)) + r = sd_bus_message_append(m, "b", arg_runtime); + else { uint64_t flags = arg_runtime ? PORTABLE_RUNTIME : 0; r = sd_bus_message_append(m, "t", flags); - } else - r = sd_bus_message_append(m, "b", arg_runtime); + } if (r < 0) return bus_log_create_error(r);