[Toybox] [PATCH] pending/useradd: unbreak build
Isaac Dunham
ibid.ag at gmail.com
Mon Jun 9 23:09:11 PDT 2014
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.
--
Thanks,
Isaac Dunham
-------------- next part --------------
diff --git a/toys/pending/useradd.c b/toys/pending/useradd.c
index 99e2530..0a79064 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;
}
More information about the Toybox
mailing list