From 6d3c5e4301df363055dc256e6692c610e4d0b918 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 26 Apr 2014 10:47:29 +0100 Subject: Add ARRAY_SIZE macro, and use it where possible. --- stmhal/modos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/modos.c') diff --git a/stmhal/modos.c b/stmhal/modos.c index f16062752..33b4ff73e 100644 --- a/stmhal/modos.c +++ b/stmhal/modos.c @@ -167,8 +167,8 @@ STATIC const mp_obj_dict_t os_module_globals = { .map = { .all_keys_are_qstrs = 1, .table_is_fixed_array = 1, - .used = sizeof(os_module_globals_table) / sizeof(mp_map_elem_t), - .alloc = sizeof(os_module_globals_table) / sizeof(mp_map_elem_t), + .used = ARRAY_SIZE(os_module_globals_table), + .alloc = ARRAY_SIZE(os_module_globals_table), .table = (mp_map_elem_t*)os_module_globals_table, }, }; -- cgit v1.2.3