From 6983f740fff3b58c2d017d6273d1fd1a0dcf4d31 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 10 May 2024 08:24:29 -0400 Subject: [PATCH] find: use S_ISREG() rather than inlining it. --- toys/posix/find.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/find.c b/toys/posix/find.c index c8e68683..ac148816 100644 --- a/toys/posix/find.c +++ b/toys/posix/find.c @@ -439,7 +439,7 @@ static int do_find(struct dirtree *new) } } else if (!strcmp(s, "size")) { if (check) test = compare_numsign(new->st.st_size, -512, arg) && - ((new->st.st_mode & S_IFMT) == S_IFREG); + S_ISREG(new->st.st_mode); } else if (!strcmp(s, "links")) { if (check) test = compare_numsign(new->st.st_nlink, 0, arg); } else if (!strcmp(s, "inum")) { -- 2.39.2