summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
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 04:53:18 +0100
commit456ebe8f8eee82c467805613f107edd84e73ac26 (patch)
treeda9a058a2e598d7dbf2efd9c61d9107eb9c5eb31 /lib/libalpm
parent9809102237f89b73a120250260bf3f68d6bc4ba9 (diff)
downloadpacman-456ebe8f8eee82c467805613f107edd84e73ac26.tar.gz
pacman-456ebe8f8eee82c467805613f107edd84e73ac26.tar.xz
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 'lib/libalpm')
-rw-r--r--lib/libalpm/pkghash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c
index 989a8c1b..5328ce43 100644
--- a/lib/libalpm/pkghash.c
+++ b/lib/libalpm/pkghash.c
@@ -66,7 +66,7 @@ alpm_pkghash_t *_alpm_pkghash_create(unsigned int size)
CALLOC(hash, 1, sizeof(alpm_pkghash_t), return NULL);
size = size / initial_hash_load + 1;
- loopsize = sizeof(prime_list) / sizeof(*prime_list);
+ loopsize = ARRAYSIZE(prime_list);
for(i = 0; i < loopsize; i++) {
if(prime_list[i] > size) {
hash->buckets = prime_list[i];