aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c
index bf6b71a83..38bbfbec9 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -197,9 +197,8 @@ ACTF(exec)
for (i = 0; i < ap->exec_argc; i++)
argv[i] = subst(ap->exec_argv[i], ap->subst_count[i], fileName);
argv[i] = NULL; /* terminate the list */
- errno = 0;
rc = wait4pid(spawn(argv));
- if (errno)
+ if (rc)
bb_perror_msg("%s", argv[0]);
for (i = 0; i < ap->exec_argc; i++)
free(argv[i]);