aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-05-10 08:24:29 -0400
committerRob Landley <rob@landley.net>2024-05-10 12:41:01 -0500
commit6983f740fff3b58c2d017d6273d1fd1a0dcf4d31 (patch)
tree23393bba21dabc6ec8ffb74dbf1ecade1aad28f2
parent6800a95ef32826e753881802a2c126c59d451397 (diff)
downloadtoybox-upstream-master.tar.gz
find: use S_ISREG() rather than inlining it.upstream-master
-rw-r--r--toys/posix/find.c2
1 files changed, 1 insertions, 1 deletions
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")) {