[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix bucket collision logic'
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix bucket collision logic' |
Date: |
Tue, 19 Jan 2021 15:51:32 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 5e08477d2 fix bucket collision logic'
5e08477d2 is described below
commit 5e08477d28493d40310317d5fa9d3654a3fb98b6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jan 19 15:50:39 2021 +0100
fix bucket collision logic'
---
src/setu/ibf.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/setu/ibf.c b/src/setu/ibf.c
index f079722bd..565adbbf0 100644
--- a/src/setu/ibf.c
+++ b/src/setu/ibf.c
@@ -112,7 +112,7 @@ ibf_create (uint32_t size, uint8_t hash_num)
/**
- * Store unique bucket indices for the specified key in dst.
+ * Store unique bucket indices for the specified @a key in @a dst.
*/
static void
ibf_get_indices (const struct InvertibleBloomFilter *ibf,
@@ -126,9 +126,9 @@ ibf_get_indices (const struct InvertibleBloomFilter *ibf,
bucket = GNUNET_CRYPTO_crc32_n (&key, sizeof key);
for (i = 0, filled = 0; filled < ibf->hash_num; i++)
{
- unsigned int j;
uint64_t x;
- for (j = 0; j < filled; j++)
+
+ for (unsigned int j = 0; j < filled; j++)
if (dst[j] == bucket)
goto try_next;
dst[filled++] = bucket % ibf->size;
@@ -142,13 +142,13 @@ try_next:;
static void
ibf_insert_into (struct InvertibleBloomFilter *ibf,
struct IBF_Key key,
- const int *buckets, int side)
+ const int *buckets,
+ int side)
{
- int i;
-
- for (i = 0; i < ibf->hash_num; i++)
+ for (unsigned int i = 0; i < ibf->hash_num; i++)
{
const int bucket = buckets[i];
+
ibf->count[bucket].count_val += side;
ibf->key_sum[bucket].key_val ^= key.key_val;
ibf->key_hash_sum[bucket].key_hash_val
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: fix bucket collision logic',
gnunet <=