From 18b9d42ce2c1628de8eb20d249681478dc4f3910 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Wed, 5 Mar 2008 14:50:34 +0100 Subject: [PATCH] small bugfixes in tries --- lib/trie.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/trie.h b/lib/trie.h index 8fc43dba..d78d6d38 100644 --- a/lib/trie.h +++ b/lib/trie.h @@ -88,7 +88,7 @@ typedef TRIE_LEN_TYPE P(len_t); #endif #ifndef TRIE_BUCKET_RANK -#define TRIE_BUCKET_RANK (2U + sizeof(void *) > 4) +#define TRIE_BUCKET_RANK (2U + (sizeof(void *) > 4)) #endif #define TRIE_BUCKET_SIZE (1U << TRIE_BUCKET_RANK) #define TRIE_BUCKET_MASK (TRIE_BUCKET_SIZE - 1) @@ -899,7 +899,7 @@ P(stats)(TAC struct P(stats) *stats) stats->small_size += ep_total_size(T.epool[i]); for (uns i = 0; i < ARRAY_SIZE(T.hpool); i++) stats->hash_size += ep_total_size(T.hpool[i]); - stats->total_size = stats->small_size + stats->total_size + sizeof(T); + stats->total_size = stats->small_size + stats->hash_size + sizeof(T); } static inline u64 -- 2.39.2