chiark / gitweb /
Provide ARRAY_SIZE
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Sep 2014 07:58:24 +0000 (08:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Sep 2014 17:48:12 +0000 (18:48 +0100)
No call sites yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
secnet.h

index 56872ed..64a20a7 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -569,5 +569,6 @@ extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log);
 #define STRING(x) STRING2(x)
 
 #define FILLZERO(obj) (memset(&(obj),0,sizeof((obj))))
+#define ARRAY_SIZE(ary) (sizeof(ary)/sizeof(ary[0]))
 
 #endif /* secnet_h */