mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
util: add common ARRAY_SIZE define
I want to use this in more places, so put it in util.h rather than copying & pasting it into another file. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b9e80656f2
commit
4ad49c3a9c
3 changed files with 2 additions and 3 deletions
2
util.h
2
util.h
|
@ -24,6 +24,8 @@
|
|||
* USA
|
||||
*/
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
static inline void __attribute__((noreturn)) die(const char *str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue