hush: code shrink
function old new delta
builtin_wait 347 328 -19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/shell/hush.c b/shell/hush.c
index 0d10771..eabe83a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -9120,12 +9120,9 @@
return EXIT_FAILURE;
}
if (waitpid(pid, &status, 0) == pid) {
+ ret = WEXITSTATUS(status);
if (WIFSIGNALED(status))
ret = 128 + WTERMSIG(status);
- else if (WIFEXITED(status))
- ret = WEXITSTATUS(status);
- else /* wtf? */
- ret = EXIT_FAILURE;
} else {
bb_perror_msg("wait %s", *argv);
ret = 127;