Diff between 31c32aee5bebb4ce9b805ee2ab3e0f8f7196b21f and 42f3e18b53c99a5048f00252fd81800ee1a60687

Changed Files

File Additions Deletions Status
src/shared/util.h +2 -0 modified

Full Patch

diff --git a/src/shared/util.h b/src/shared/util.h
index 604dc3b..9193068 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -27,6 +27,8 @@
 #include <byteswap.h>
 #include <string.h>
 
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define le16_to_cpu(val) (val)
 #define le32_to_cpu(val) (val)