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>
Thu, 2 Oct 2014 15:30:21 +0000 (16:30 +0100)
No call sites yet.

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

index bcb8b6a3d56c280b67d21aaef3f28fabe98fe66b..a046830ac550e0bd3e99b9e1032b16d2a7f38e43 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -569,6 +569,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 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);
 
 /*
  * void COPY_OBJ(  OBJECT& dst, const OBJECT& src);