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>
Sun, 5 Oct 2014 21:23:51 +0000 (22:23 +0100)
No call sites yet.

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

index 78dc676..5c97751 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -574,6 +574,7 @@ 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]))
 
 /*
  * void COPY_OBJ(  OBJECT& dst, const OBJECT& src);