summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-06 23:05:53 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-06 23:05:53 +0200
commit3886dd097f07a3b57dfa884a35e2ae0e41b1b864 (patch)
tree1c5ca7056e27ab7854270ab5312cbd9c8ccedd05
parentb1435d6e0580854fd4f26eb51c3a52a3038f863a (diff)
fs: use ARRAY_SIZE macro
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--lib/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 1704ab3..cb7e8ef 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -549,7 +549,7 @@ void ut_module_init(const struct ut_ops *ut, struct ut_state *s, struct json_obj
ops->register_type("fs.file", close_file);
ops->register_type("fs.dir", close_dir);
- for (i = 0; i < sizeof(functions) / sizeof(functions[0]); i++)
+ for (i = 0; i < ARRAY_SIZE(functions); i++)
ops->register_function(s, scope, functions[i].name, functions[i].func);
file_proto = ops->new_object(s, NULL);