kargs: Simplify conditional statements

Follow-up for PR #2776
Simplify multiple if statements into one if  else statement

Signed-off-by: Rafael G. Ruiz <llerrak@hotmail.com>
This commit is contained in:
Rafael G. Ruiz 2021-05-08 12:39:37 +02:00
parent 57250d11ab
commit 6d6ebd324d

View File

@ -358,17 +358,10 @@ rpmostree_builtin_kargs (int argc,
error)) error))
return FALSE; return FALSE;
if (opt_unchanged_exit_77)
{
if (!rpmostree_has_new_default_deployment (os_proxy, previous_deployment))
{
invocation->exit_code = RPM_OSTREE_EXIT_UNCHANGED;
return TRUE;
}
}
if (rpmostree_has_new_default_deployment (os_proxy, previous_deployment)) if (rpmostree_has_new_default_deployment (os_proxy, previous_deployment))
g_print("Kernel arguments updated.\nRun \"systemctl reboot\" to start a reboot\n"); g_print("Kernel arguments updated.\nRun \"systemctl reboot\" to start a reboot\n");
else if (opt_unchanged_exit_77)
invocation->exit_code = RPM_OSTREE_EXIT_UNCHANGED;
return TRUE; return TRUE;
} }