aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-21 12:57:51 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-21 12:57:51 +0100
commitb7abb3a11f1b8252945fab43c4575741fa90143b (patch)
tree9dce1a9a29d0d8c4929bb2c43e9e93336d071e25 /src
parent5e08477d28493d40310317d5fa9d3654a3fb98b6 (diff)
downloadgnunet-b7abb3a11f1b8252945fab43c4575741fa90143b.tar.gz
gnunet-b7abb3a11f1b8252945fab43c4575741fa90143b.zip
fixes
Diffstat (limited to 'src')
-rw-r--r--src/setu/gnunet-service-setu.c3
-rw-r--r--src/setu/ibf.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index e7f27bd7d..e5d8751f2 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -1000,7 +1000,8 @@ op_register_element (struct Operation *op,
1000 1000
1001 1001
1002/** 1002/**
1003 * FIXME. 1003 * Modify an IBF key @a k_in based on the @a salt, returning a
1004 * salted key in @a k_out.
1004 */ 1005 */
1005static void 1006static void
1006salt_key (const struct IBF_Key *k_in, 1007salt_key (const struct IBF_Key *k_in,
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;
135try_next:; 135try_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 }