From 456ebe8f8eee82c467805613f107edd84e73ac26 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 21 Oct 2015 11:11:17 +0200 Subject: Use ARRAYSIZE macro for non-string array size computation Signed-off-by: Pierre Neidhardt Signed-off-by: Allan McRae --- lib/libalpm/pkghash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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]; -- cgit v1.2.3-70-g09d2