summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorkhali <khali>2007-02-11 20:10:59 +0000
committerkhali <khali>2007-02-11 20:10:59 +0000
commit3592a2ee5c7ec20144582e76e7cff7f1065734fb (patch)
treef907abb8e63d79e6301e734e088ed078b5947a4e /util.h
parent943a847c96fa8cca2f7233cc572859fa369a73cd (diff)
downloaddmidecode-3592a2ee5c7ec20144582e76e7cff7f1065734fb.tar.gz
Define an ARRAY_SIZE macro which computes the size of a static array, and
use it where relevant.
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index d067215..b546f64 100644
--- a/util.h
+++ b/util.h
@@ -2,5 +2,7 @@
#include "types.h"
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
int checksum(const u8 *buf, size_t len);
void *mem_chunk(size_t base, size_t len, const char *devmem);