summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/arrlen.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arrlen.h b/lib/arrlen.h
new file mode 100644
index 0000000..fdc5532
--- /dev/null
+++ b/lib/arrlen.h
@@ -0,0 +1,6 @@
+#ifndef LIB_ARRLEN_H
+#define LIB_ARRLEN_H
+
+#define ARRLEN(a) (sizeof (a) / sizeof (a)[0])
+
+#endif /* LIB_ARRLEN_H */