summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index fd9db77..250dbdc 100644
--- a/utils.h
+++ b/utils.h
@@ -44,6 +44,8 @@ static inline bool list_empty(struct list_head *list)
return list->next == list;
}
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define container_of(ptr, type, member) ({ \