OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef377cf
)
pending/useradd: unbreak build
author
Isaac Dunham
<ibid.ag@gmail.com>
Tue, 10 Jun 2014 13:29:10 +0000
(08:29 -0500)
committer
Isaac Dunham
<ibid.ag@gmail.com>
Tue, 10 Jun 2014 13:29:10 +0000
(08:29 -0500)
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
patch
|
blob
|
history
diff --git
a/toys/pending/useradd.c
b/toys/pending/useradd.c
index
99e2530
..
0a79064
100644
(file)
--- 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;
}