about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/utils.h b/misc/utils.h
new file mode 100644
index 0000000..d996779
--- /dev/null
+++ b/misc/utils.h
@@ -0,0 +1,7 @@
+#ifndef BTPD_UTILS_H
+#define BTPD_UTILS_H
+
+/* get the number of elements in a static table */
+#define ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
+
+#endif