diff options
Diffstat (limited to 'Hashtable.c')
-rw-r--r-- | Hashtable.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Hashtable.c b/Hashtable.c index 9b0882a..d040afa 100644 --- a/Hashtable.c +++ b/Hashtable.c @@ -11,7 +11,6 @@ in the source distribution for its full text. #include <assert.h> #include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -19,6 +18,10 @@ in the source distribution for its full text. #include "Macros.h" #include "XUtils.h" +#ifndef NDEBUG +#include <stdio.h> +#endif + typedef struct HashtableItem_ { ht_key_t key; @@ -95,7 +98,7 @@ static const uint64_t OEISprimes[] = { 34359738337, 68719476731, 137438953447 }; -static uint64_t nextPrime(size_t n) { +static size_t nextPrime(size_t n) { /* on 32-bit make sure we do not return primes not fitting in size_t */ for (size_t i = 0; i < ARRAYSIZE(OEISprimes) && OEISprimes[i] < SIZE_MAX; i++) { if (n <= OEISprimes[i]) |