# HG changeset patch # User Isaac Dunham # Date 1402406950 18000 # Node ID c7bf4541d5be7bb20bf75f0bf933c4862b400270 # Parent ef63b63230ee337c345e0df0181399784c7df351 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 -r ef63b63230ee -r c7bf4541d5be toys/pending/useradd.c --- a/toys/pending/useradd.c Mon Jun 09 07:13:05 2014 -0500 +++ b/toys/pending/useradd.c Tue Jun 10 08:29:10 2014 -0500 @@ -61,7 +61,7 @@ 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; }