[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 71/164: Fixed some ugly construct
From: |
gnunet |
Subject: |
[gnunet] 71/164: Fixed some ugly construct |
Date: |
Fri, 30 Jul 2021 15:32:17 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 4ac104770aad885929258e931ee11a0c35abfbe5
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Wed Apr 28 21:59:46 2021 +0200
Fixed some ugly construct
---
src/setu/ibf.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/setu/ibf.c b/src/setu/ibf.c
index 16a1d0147..68757ce61 100644
--- a/src/setu/ibf.c
+++ b/src/setu/ibf.c
@@ -312,6 +312,9 @@ ibf_get_max_counter (struct InvertibleBloomFilter *ibf)
max_counter=ibf->count[i].count_val;
}
}
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "max_counter: %016X OLD: %f NEW: %u NEW_INT %u \n", max_counter,
floor(log2(max_counter)) + 1, 32 -__builtin_clz(max_counter));
+
return floor(log2(max_counter)) + 1;
}
@@ -352,14 +355,9 @@ ibf_write_slice (const struct InvertibleBloomFilter *ibf,
key_hash_dst += count;
/* pack and copy counter */
- size_t buf_size = ceil((float) count/(8/(float)counter_max_length));
- uint64_t *new_buf;
- new_buf = (uint8_t*) GNUNET_malloc(buf_size);
- pack_counter(ibf,start,count,new_buf,counter_max_length);
count_dst = (uint8_t *) key_hash_dst;
- GNUNET_memcpy (count_dst,
- new_buf,
- buf_size);
+ pack_counter(ibf,start,count,count_dst,counter_max_length);
+
}
@@ -392,8 +390,8 @@ pack_counter(const struct InvertibleBloomFilter *ibf,
"NEW VAL: count_val_to_write: %d count_len_to_write:%u \n",
count_val_to_write, count_len_to_write);
**/
LOG (GNUNET_ERROR_TYPE_ERROR,
- "SAVE VALUE: %X\n",
- count_val_to_write);
+ "SAVE VALUE: %d\n",
+ ibf->count[i].count_val);
while(count_len_to_write > 0) {
uint8_t byte_to_write=0;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 100/164: Added message flow control, (continued)
- [gnunet] 100/164: Added message flow control, gnunet, 2021/07/30
- [gnunet] 108/164: Added some more sec checks, gnunet, 2021/07/30
- [gnunet] 93/164: Perftest, gnunet, 2021/07/30
- [gnunet] 94/164: Perftest, gnunet, 2021/07/30
- [gnunet] 86/164: Perf test, gnunet, 2021/07/30
- [gnunet] 20/164: Run over night, gnunet, 2021/07/30
- [gnunet] 53/164: Reverte change to changes salt, gnunet, 2021/07/30
- [gnunet] 46/164: Test data 50 elements, gnunet, 2021/07/30
- [gnunet] 69/164: Pack IBF counter to use only as much storage as needed, gnunet, 2021/07/30
- [gnunet] 83/164: Perf test, gnunet, 2021/07/30
- [gnunet] 71/164: Fixed some ugly construct,
gnunet <=
- [gnunet] 82/164: Perf test, gnunet, 2021/07/30
- [gnunet] 91/164: Perftest, gnunet, 2021/07/30
- [gnunet] 92/164: Perftest, gnunet, 2021/07/30
- [gnunet] 97/164: Perftest, gnunet, 2021/07/30
- [gnunet] 72/164: Performance chech, gnunet, 2021/07/30
- [gnunet] 79/164: Added perf monitoring of operation mode, gnunet, 2021/07/30
- [gnunet] 107/164: Increased shufle nonce to 64bit, gnunet, 2021/07/30
- [gnunet] 96/164: Perftest, gnunet, 2021/07/30
- [gnunet] 99/164: Securyt improvement prevent peer from receiving message in wrong phase, gnunet, 2021/07/30
- [gnunet] 90/164: Perftest, gnunet, 2021/07/30