aboutsummaryrefslogtreecommitdiff
path: root/findutils/find.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-03-29 10:30:50 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-03-29 10:30:50 +0000
commit3e816c1252cc55e3763f946622129d31ea1f0f20 (patch)
tree5031fd816b1df09eaa897530a37ce814bba95011 /findutils/find.c
parent3d43edb28c80ee9cb54335f593d42d5d0471e15a (diff)
downloadbusybox-3e816c1252cc55e3763f946622129d31ea1f0f20.tar.gz
- fold recurse, depthFirst and dereference params into one param flags.
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
Diffstat (limited to 'findutils/find.c')
-rw-r--r--findutils/find.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/findutils/find.c b/findutils/find.c
index e98d995a4..c043fbc7d 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -574,7 +574,7 @@ static action*** parse_params(char **argv)
int find_main(int argc, char **argv);
int find_main(int argc, char **argv)
{
- int dereference = FALSE;
+ bool dereference = FALSE;
char *arg;
char **argp;
int i, firstopt, status = EXIT_SUCCESS;
@@ -632,13 +632,11 @@ int find_main(int argc, char **argv)
for (i = 1; i < firstopt; i++) {
if (!recursive_action(argv[i],
- TRUE, // recurse
- dereference, // follow links
- FALSE, // depth first
- fileAction, // file action
- fileAction, // dir action
- NULL, // user data
- 0)) // depth
+ action_recurse|(1<<dereference), /* flags */
+ fileAction, /* file action */
+ fileAction, /* dir action */
+ NULL, /* user data */
+ 0)) /* depth */
status = EXIT_FAILURE;
}
return status;