diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-10-23 22:09:43 -0400 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-10-23 22:09:43 -0400 |
| commit | 96b042b925ccc28c6cf179da20e582bf66c3302c (patch) | |
| tree | 340de7d0107ad485de9b32f6ae048f65bd2ce193 /src/core | |
| parent | b1b918378513566a9359e655ea538292c62d4173 (diff) | |
| download | nng-96b042b925ccc28c6cf179da20e582bf66c3302c.tar.gz nng-96b042b925ccc28c6cf179da20e582bf66c3302c.tar.bz2 nng-96b042b925ccc28c6cf179da20e582bf66c3302c.zip | |
fixes #761 idhash work to factor in upper bits is pointless
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/idhash.c | 3 |
1 files changed, 1 insertions, 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) |
