From 3c3928fc658bddacd4e540589868bc28a8e4ca0a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 1 Oct 2020 20:27:28 +0200 Subject: tydy up a few uses of recursive_action(), no logic changes Signed-off-by: Denys Vlasenko --- debianutils/run_parts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debianutils') diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index c80cc863f..196e0640d 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c @@ -133,10 +133,10 @@ static int bb_alphasort(const void *p1, const void *p2) static int FAST_FUNC act(const char *file, struct stat *statbuf, void *args UNUSED_PARAM, int depth) { - if (depth == 1) + if (depth == 0) return TRUE; - if (depth == 2 + if (depth == 1 && ( !(statbuf->st_mode & (S_IFREG | S_IFLNK)) || invalid_name(file) || (!(option_mask32 & OPT_l) && access(file, X_OK) != 0)) @@ -200,8 +200,8 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv) act, /* file action */ act, /* dir action */ NULL, /* user data */ - 1 /* depth */ - ); + 0 /* depth */ + ); if (!names) return 0; -- cgit v1.2.3