Skip to content

Commit 007a1c8

Browse files
committed
nsi_utils.h: Add NSI_ARRAY_SIZE() macro
Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 20d3b2b commit 007a1c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

common/src/include/nsi_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#define NSI_MAX(a, b) (((a) > (b)) ? (a) : (b))
2222
#define NSI_MIN(a, b) (((a) < (b)) ? (a) : (b))
2323

24+
#define NSI_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
25+
2426
#ifndef NSI_ARG_UNUSED
2527
#define NSI_ARG_UNUSED(x) (void)(x)
2628
#endif

0 commit comments

Comments
 (0)