aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/find.c14
-rw-r--r--findutils/grep.c6
2 files changed, 9 insertions, 11 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;
diff --git a/findutils/grep.c b/findutils/grep.c
index f6ea54ed2..43810ea84 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -336,9 +336,9 @@ static int grep_dir(const char *dir)
{
int matched = 0;
recursive_action(dir,
- /* recurse= */ 1,
- /* followLinks= */ 0,
- /* depthFirst= */ 1,
+ /* recurse= */ action_recurse |
+ /* followLinks= */ /* no. 0 | */
+ /* depthFirst= */ action_depthFirst,
/* fileAction= */ file_action_grep,
/* dirAction= */ NULL,
/* userData= */ &matched,