Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorPierre Neidhardt <ambrevar@gmail.com>2015-10-21 11:11:17 +0200
committerAllan McRae <allan@archlinux.org>2015-10-27 13:53:18 +1000
commit456ebe8f8eee82c467805613f107edd84e73ac26 (patch)
treeda9a058a2e598d7dbf2efd9c61d9107eb9c5eb31 /src/common
parent9809102237f89b73a120250260bf3f68d6bc4ba9 (diff)
Use ARRAYSIZE macro for non-string array size computation
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util-common.h b/src/common/util-common.h
index af2ebdaa..f604e79a 100644
--- a/src/common/util-common.h
+++ b/src/common/util-common.h
@@ -36,6 +36,8 @@ size_t strtrim(char *str);
char *strndup(const char *s, size_t n);
#endif
+#define ARRAYSIZE(a) (sizeof (a) / sizeof (a[0]))
+
#endif /* _PM_UTIL_COMMON_H */
/* vim: set noet: */