aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index e413883..376d132 100644
--- a/src/util.h
+++ b/src/util.h
@@ -3,6 +3,8 @@
#include <stdbool.h>
#include <stdarg.h>
+#define ARRLEN(x) (sizeof(x) / sizeof((x)[0]))
+
#define ERR(...) stdio_log(LOG_ERR, __VA_ARGS__)
#define WARN(...) stdio_log(LOG_WARN, __VA_ARGS__)
#define INFO(...) stdio_log(LOG_INFO, __VA_ARGS__)