summaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'findutils/grep.c')
-rw-r--r--findutils/grep.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index 0892a71..10cca83 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -656,10 +656,9 @@ static void load_pattern_list(llist_t **lst, char *pattern)
llist_add_to(lst, new_grep_list_data(p, 0));
}
-static int FAST_FUNC file_action_grep(const char *filename,
- struct stat *statbuf,
- void* matched,
- int depth UNUSED_PARAM)
+static int FAST_FUNC file_action_grep(struct recursive_state *state UNUSED_PARAM,
+ const char *filename,
+ struct stat *statbuf)
{
FILE *file;
@@ -686,7 +685,7 @@ static int FAST_FUNC file_action_grep(const char *filename,
return 0;
}
cur_file = filename;
- *(int*)matched |= grep_file(file);
+ *(int*)state->userData |= grep_file(file);
fclose(file);
return 1;
}
@@ -702,8 +701,8 @@ static int grep_dir(const char *dir)
| 0,
/* fileAction= */ file_action_grep,
/* dirAction= */ NULL,
- /* userData= */ &matched,
- 0);
+ /* userData= */ &matched
+ );
return matched;
}