aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-03 13:37:53 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-03 13:40:24 +0100
commit0b719766a5bf9ca0dd73d53d23bbd26a4a77ea72 (patch)
tree9dd6bd19cc1affb02e110bc3c13ae98f25e70b9b
parenta28dee7044abee93a1fbf715589181b602552661 (diff)
downloadrspamd-0b719766a5bf9ca0dd73d53d23bbd26a4a77ea72.tar.gz
rspamd-0b719766a5bf9ca0dd73d53d23bbd26a4a77ea72.zip
Fix radix tree size calculations.
-rw-r--r--src/libutil/radix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index 0d51d77f7..d1d30b353 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -388,6 +388,7 @@ radix_uncompress_node (radix_compressed_t *tree,
nnode->d.n.right = node;
}
}
+ tree->size ++;
}
return value;
@@ -458,6 +459,7 @@ radix_insert_compressed (radix_compressed_t * tree,
else if (next->value == RADIX_NO_VALUE) {
msg_debug ("insert value node with %p", value);
next->value = value;
+ tree->size ++;
}
else {
if (next->skipped) {
@@ -483,6 +485,7 @@ radix_insert_compressed (radix_compressed_t * tree,
node->d.n.left = next;
}
oldval = next->value;
+ tree->size ++;
}
else {
/*
@@ -505,6 +508,7 @@ radix_insert_compressed (radix_compressed_t * tree,
next->d.n.right = NULL;
}
oldval = next->value;
+ tree->size ++;
}
}
else {