Skip to content

Commit 9bc59b6

Browse files
committed
fix: IC_ARRAY_SIZE was length, not size
1 parent 198b1ed commit 9bc59b6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

include/zephyr/util.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ extern "C" {
138138
* @param array A C array (that has not decayed to a pointer)
139139
* @return size_t - size of the array in 8-bit bytes
140140
*/
141-
# define IC_ARRAY_SIZE(array) \
142-
(size_t)(_IC_IS_ARRAY(array) + (sizeof(array) / sizeof((array)[0])))
141+
# define IC_ARRAY_SIZE(array) (size_t)(_IC_IS_ARRAY(array) + sizeof(array))
143142

144143
#endif /* not __cplusplus */
145144

0 commit comments

Comments
 (0)