summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/modstm.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-26 10:47:29 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-26 10:47:29 +0100
commit6d3c5e4301df363055dc256e6692c610e4d0b918 (patch)
treea07a18ed1a13d50990cf0e43a2a3c919cb14240d /stmhal/modstm.c
parentd139c489bab6b58906868e3fc8383ea813a122d4 (diff)
downloadmicropython-6d3c5e4301df363055dc256e6692c610e4d0b918.tar.gz
micropython-6d3c5e4301df363055dc256e6692c610e4d0b918.zip
Add ARRAY_SIZE macro, and use it where possible.
Diffstat (limited to 'stmhal/modstm.c')
-rw-r--r--stmhal/modstm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/modstm.c b/stmhal/modstm.c
index c923d13f3d..078f590ece 100644
--- a/stmhal/modstm.c
+++ b/stmhal/modstm.c
@@ -105,8 +105,8 @@ STATIC const mp_obj_dict_t stm_module_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(stm_module_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(stm_module_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(stm_module_globals_table),
+ .alloc = ARRAY_SIZE(stm_module_globals_table),
.table = (mp_map_elem_t*)stm_module_globals_table,
},
};