summaryrefslogtreecommitdiffstats
path: root/src/fsade.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-07 10:21:19 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-12-07 10:51:47 -0500
commit2898d6b79d15c984f95977f7385dd4273087c61b (patch)
treee436af4a2a1fc627b2b48a2e93cc77b27f7130b3 /src/fsade.c
parentd1e532ed839c1b2be093c88006fcf4cd3d11805d (diff)
downloadbfs-2898d6b79d15c984f95977f7385dd4273087c61b.tar.xz
config: New BFS_COUNTOF macro
Diffstat (limited to 'src/fsade.c')
-rw-r--r--src/fsade.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fsade.c b/src/fsade.c
index a609b97..45969d1 100644
--- a/src/fsade.c
+++ b/src/fsade.c
@@ -206,7 +206,6 @@ int bfs_check_acl(const struct BFTW *ftwbuf) {
ACL_TYPE_NFS4,
#endif
};
- static const size_t n_acl_types = sizeof(acl_types)/sizeof(acl_types[0]);
if (ftwbuf->type == BFS_LNK) {
return 0;
@@ -215,7 +214,7 @@ int bfs_check_acl(const struct BFTW *ftwbuf) {
const char *path = fake_at(ftwbuf);
int ret = -1, error = 0;
- for (size_t i = 0; i < n_acl_types && ret <= 0; ++i) {
+ for (size_t i = 0; i < BFS_COUNTOF(acl_types) && ret <= 0; ++i) {
acl_type_t type = acl_types[i];
if (type == ACL_TYPE_DEFAULT && ftwbuf->type != BFS_DIR) {