hush: code shrink

function                                             old     new   delta
builtin_wait                                         347     328     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2015-10-11 21:47:11 +02:00
parent 932302666b
commit 85378cded7

View File

@ -9120,12 +9120,9 @@ static int FAST_FUNC builtin_wait(char **argv)
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;