changeset 1347:c7bf4541d5be

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.
author Isaac Dunham <ibid.ag@gmail.com>
date Tue, 10 Jun 2014 08:29:10 -0500
parents ef63b63230ee
children 63d8181b0f92
files toys/pending/useradd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }