summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2007-02-11 20:10:59 +0000
committerJean Delvare <jdelvare@suse.de>2007-02-11 20:10:59 +0000
commit850f5935dd4d354c80a8f03f0e215aaaab5d1773 (patch)
treef907abb8e63d79e6301e734e088ed078b5947a4e /util.h
parent3e7a3c2ab90404f3849553b6d9ac7c6569ece7fb (diff)
downloaddmidecode-git-850f5935dd4d354c80a8f03f0e215aaaab5d1773.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);