summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-12 15:21:23 +0200
committerMartin Mares <mj@ucw.cz>2000-04-12 15:21:23 +0200
commit775063494694d247b340bb1145e509e31af27802 (patch)
tree82c4fa2f3411d25aff61132b928b9055ea8881a8 /lib
parentdcab78904794156483878b4b8cd924e30a71bcdd (diff)
downloadbird-775063494694d247b340bb1145e509e31af27802.tar
bird-775063494694d247b340bb1145e509e31af27802.zip
Introduced `ARRAY_SIZE' macro to replace all the sizeof(a)/sizeof(*a) constructs.
Diffstat (limited to 'lib')
-rw-r--r--lib/birdlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 6f05330..933e3d5 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -19,6 +19,7 @@
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
+#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#ifndef NULL
#define NULL ((void *) 0)