add a new ARRAY_SIZE macro and use it

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2012-05-05 20:26:54 -04:00
parent 3969cb2a85
commit 0813a80223
3 changed files with 6 additions and 4 deletions

View File

@@ -46,6 +46,8 @@
# define _unused
#endif
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
/* Some libc implemntations don't have these */
#ifndef TAILQ_CONCAT
#define TAILQ_CONCAT(head1, head2, field) do { \