]> mj.ucw.cz Git - libucw.git/blobdiff - lib/hashtable.h
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#v3.8
[libucw.git] / lib / hashtable.h
index aa73ad8f8f69732bfbc07183d355b8fa7d839e77..0419a47ce6468162833f9de277b29792dca2c0a3 100644 (file)
@@ -317,8 +317,6 @@ static inline void P(init_data) (TAUC P(node) *n UNUSED)
 }
 #endif
 
-#include <stdlib.h>
-
 #ifdef HASH_GIVE_ALLOC
 /* If the caller has requested to use his own allocation functions, do so */
 static inline void P(init_alloc) (TAU) { }
@@ -381,7 +379,7 @@ static inline void * P(new_bucket)(TAUC uns size) { return P(alloc)(TTC size); }
 
 static void P(alloc_table) (TAU)
 {
-  T.hash_size = nextprime(T.hash_size);
+  T.hash_size = next_table_prime(T.hash_size);
   T.ht = P(table_alloc)(TTC sizeof(void *) * T.hash_size);
   bzero(T.ht, sizeof(void *) * T.hash_size);
   if (2*T.hash_size < T.hash_hard_max)