From e65ee3a8a3caf124d81a488c69331e93af541f24 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 12 Aug 2004 11:42:02 +0000 Subject: reorder else if blocks, it's useless to do two times the same test (WEXITSTATUS(wait_status) == exit_value_proceed) --- mdk-stage1/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mdk-stage1/init.c') diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index 3a8d8e3b8..3aada32bb 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -524,16 +524,16 @@ int main(int argc, char **argv) if (in_reboot()) { // any exitcode is valid if we're in_reboot - } else if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != exit_value_proceed)) { - printf("exited abnormally :-( "); - if (WIFSIGNALED(wait_status)) - printf("-- received signal %d", WTERMSIG(wait_status)); - printf("\n"); abnormal_termination = 1; } else if (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == exit_value_proceed) { kill(klog_pid, 9); printf("proceeding, please wait...\n"); return 0; + } else if (!WIFEXITED(wait_status) || WEXITSTATUS(wait_status) != 0) { + printf("exited abnormally :-( "); + if (WIFSIGNALED(wait_status)) + printf("-- received signal %d", WTERMSIG(wait_status)); + printf("\n"); } if (!abnormal_termination) { -- cgit v1.2.1