From 96b042b925ccc28c6cf179da20e582bf66c3302c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 23 Oct 2018 22:09:43 -0400 Subject: fixes #761 idhash work to factor in upper bits is pointless --- src/core/idhash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/idhash.c b/src/core/idhash.c index 17e80210..a13a16c8 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -92,8 +92,7 @@ nni_idhash_set_limits( // Inspired by Python dict implementation. This probe will visit every // cell. We always hash consecutively assigned IDs. #define NNI_IDHASH_NEXTPROBE(h, j) ((((j) *5) + 1) & (h->ih_cap - 1)) -#define NNI_IDHASH_INDEX(h, j) \ - (((j & 0xffffffff) ^ (j >> 32)) & (h->ih_cap - 1)) +#define NNI_IDHASH_INDEX(h, j) ((j) & (h->ih_cap - 1)) static size_t nni_hash_find_index(nni_idhash *h, uint64_t id) -- cgit v1.2.3-70-g09d2