summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1997-05-28 00:47:27 +0000
committeralex <alex@FreeBSD.org>1997-05-28 00:47:27 +0000
commite9395b7e9ab89be7ef93a1dc77ae89744b2915de (patch)
treeface7ab31dc80a75881c310a563caf50f8ea231a /sys/kern/kern_subr.c
parent072ad65a295326e4c358c3f1b998b2295a76991c (diff)
downloadFreeBSD-src-e9395b7e9ab89be7ef93a1dc77ae89744b2915de.zip
FreeBSD-src-e9395b7e9ab89be7ef93a1dc77ae89744b2915de.tar.gz
Define NPRIMES in terms of the number of elements in 'primes' (as opposed
to hardcoding it).
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index d0097df..236824f 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_subr.c 8.3 (Berkeley) 1/21/94
- * $Id$
+ * $Id: kern_subr.c,v 1.10 1997/02/22 09:39:11 peter Exp $
*/
#include <sys/param.h>
@@ -218,10 +218,10 @@ hashinit(elements, type, hashmask)
return (hashtbl);
}
-#define NPRIMES 27
static 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]))
/*
* General routine to allocate a prime number sized hash table.
OpenPOWER on IntegriCloud