diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-01-21 12:57:51 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-01-21 12:57:51 +0100 |
commit | b7abb3a11f1b8252945fab43c4575741fa90143b (patch) | |
tree | 9dce1a9a29d0d8c4929bb2c43e9e93336d071e25 /src/setu/ibf.c | |
parent | 5e08477d28493d40310317d5fa9d3654a3fb98b6 (diff) | |
download | gnunet-b7abb3a11f1b8252945fab43c4575741fa90143b.tar.gz gnunet-b7abb3a11f1b8252945fab43c4575741fa90143b.zip |
fixes
Diffstat (limited to 'src/setu/ibf.c')
-rw-r--r-- | src/setu/ibf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/setu/ibf.c b/src/setu/ibf.c index 565adbbf0..79b4f28db 100644 --- a/src/setu/ibf.c +++ b/src/setu/ibf.c | |||
@@ -129,10 +129,10 @@ ibf_get_indices (const struct InvertibleBloomFilter *ibf, | |||
129 | uint64_t x; | 129 | uint64_t x; |
130 | 130 | ||
131 | for (unsigned int j = 0; j < filled; j++) | 131 | for (unsigned int j = 0; j < filled; j++) |
132 | if (dst[j] == bucket) | 132 | if (dst[j] == bucket % ibf->size) |
133 | goto try_next; | 133 | goto try_next; |
134 | dst[filled++] = bucket % ibf->size; | 134 | dst[filled++] = bucket % ibf->size; |
135 | try_next:; | 135 | try_next: |
136 | x = ((uint64_t) bucket << 32) | i; | 136 | x = ((uint64_t) bucket << 32) | i; |
137 | bucket = GNUNET_CRYPTO_crc32_n (&x, sizeof x); | 137 | bucket = GNUNET_CRYPTO_crc32_n (&x, sizeof x); |
138 | } | 138 | } |