From: Isaac Dunham Date: Tue, 10 Jun 2014 13:29:10 +0000 (-0500) Subject: pending/useradd: unbreak build X-Git-Tag: android-x86-6.0-r1~476 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b5f97805cee1daab12641ad8927d0539aa0d99ac;p=android-x86%2Fexternal-toybox.git pending/useradd: unbreak build When useradd started using xfork(), the conditional in else if (pid > 0) became unnecessary, since else means pid is nonzero and xfork makes it non-negative. However, the "if" was not deleted. --- diff --git a/toys/pending/useradd.c b/toys/pending/useradd.c index 99e2530f..0a79064b 100644 --- a/toys/pending/useradd.c +++ b/toys/pending/useradd.c @@ -61,7 +61,7 @@ static int exec_wait(char **args) pid_t pid = xfork(); if (!pid) xexec(args); - else if waitpid(pid, &status, 0); + else waitpid(pid, &status, 0); return WIFEXITED(status) ? WEXITSTATUS(status) : WTERMSIG(status)+127; }