commit | 80a21dc60fa007bb00437fdc047c3e059232639f | [log] [tgz] |
---|---|---|
author | David Lamparter <equinox@opensourcerouting.org> | Tue May 08 13:32:12 2012 +0200 |
committer | David Lamparter <equinox@opensourcerouting.org> | Thu Oct 25 10:15:59 2012 -0700 |
tree | 884fad4cd756c73e36232b6182e46d85ba64e229 | |
parent | f02a09925db53d3e1d29b1917ebbcaa8edf72c12 [diff] |
lib: add array_size() helper implement array_size as sizeof(array) / sizeof(array element) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/lib/memory.h b/lib/memory.h index a7eddce..2396223 100644 --- a/lib/memory.h +++ b/lib/memory.h
@@ -21,6 +21,8 @@ #ifndef _ZEBRA_MEMORY_H #define _ZEBRA_MEMORY_H +#define array_size(ar) (sizeof(ar) / sizeof(ar[0])) + /* For pretty printing of memory allocate information. */ struct memory_list {