diff options
author | Daniel Lange <DLange@git.local> | 2021-09-21 08:35:19 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-09-21 08:35:19 +0200 |
commit | 69f439eff387a6ecb52734e400b297a3c85f2285 (patch) | |
tree | 2a988b7868b749654796183ba70b4272965da1bf /Hashtable.c | |
parent | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff) | |
download | debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.tar.gz debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.tar.bz2 debian_htop-69f439eff387a6ecb52734e400b297a3c85f2285.zip |
New upstream version 3.1.0upstream/3.1.0
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]) |