From b5f97805cee1daab12641ad8927d0539aa0d99ac Mon Sep 17 00:00:00 2001 From: Isaac Dunham Date: Tue, 10 Jun 2014 08:29:10 -0500 Subject: 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. --- toys/pending/useradd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3