[RFC PATCH 1/4] Fix trie
Ákos Uzonyi
uzonyi.akos at gmail.com
Thu Aug 13 15:32:39 UTC 2020
---
trie.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/trie.c b/trie.c
index b7d56ed5..b2d421cd 100644
--- a/trie.c
+++ b/trie.c
@@ -125,6 +125,12 @@ trie_data_block_calc_pos(struct trie *t, uint64_t key,
key_mask = (1 << t->data_block_key_bits) - 1;
*pos = (key & key_mask) >> (6 - t->item_size_lg);
+ if (t->item_size_lg == 6) {
+ *offs = 0;
+ *mask = -1;
+ return;
+ }
+
key_mask = (1 << (6 - t->item_size_lg)) - 1;
*offs = (key & key_mask) * (1 << t->item_size_lg);
--
2.28.0
More information about the Strace-devel
mailing list