diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-19 23:48:27 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-19 23:48:27 +0000 |
commit | a7d40a88c91d105dcfe2f235bc84a522bfea3de2 (patch) | |
tree | de102c840aded1a3b5511745802f9d6ef74aeb6f /sys/kern/subr_hash.c | |
parent | 99e9a53c8161ee4ae550ad18b73edd303a3724f4 (diff) | |
download | FreeBSD-src-a7d40a88c91d105dcfe2f235bc84a522bfea3de2.zip FreeBSD-src-a7d40a88c91d105dcfe2f235bc84a522bfea3de2.tar.gz |
kernel: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
Diffstat (limited to 'sys/kern/subr_hash.c')
-rw-r--r-- | sys/kern/subr_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_hash.c b/sys/kern/subr_hash.c index fe81286..915f3f7 100644 --- a/sys/kern/subr_hash.c +++ b/sys/kern/subr_hash.c @@ -101,7 +101,7 @@ hashdestroy(void *vhashtbl, struct malloc_type *type, u_long hashmask) static const int primes[] = { 1, 13, 31, 61, 127, 251, 509, 761, 1021, 1531, 2039, 2557, 3067, 3583, 4093, 4603, 5119, 5623, 6143, 6653, 7159, 7673, 8191, 12281, 16381, 24571, 32749 }; -#define NPRIMES (sizeof(primes) / sizeof(primes[0])) +#define NPRIMES nitems(primes) /* * General routine to allocate a prime number sized hash table. |