summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/modpyb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/modpyb.c')
-rw-r--r--stmhal/modpyb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c
index 7aec712510..a4e54fb87c 100644
--- a/stmhal/modpyb.c
+++ b/stmhal/modpyb.c
@@ -324,8 +324,8 @@ STATIC const mp_obj_dict_t pyb_module_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(pyb_module_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(pyb_module_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(pyb_module_globals_table),
+ .alloc = ARRAY_SIZE(pyb_module_globals_table),
.table = (mp_map_elem_t*)pyb_module_globals_table,
},
};