Add ARRAYLEN macro
This commit is contained in:
parent
1024ce8ecd
commit
382cd7a371
@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
#define USE_RET __attribute__((warn_unused_result))
|
#define USE_RET __attribute__((warn_unused_result))
|
||||||
|
|
||||||
|
#define ARRAYLEN(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
|
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
#endif /* COMMON_H */
|
#endif /* COMMON_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user