]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix radix tree size calculations.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 12:37:53 +0000 (13:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Sep 2015 12:40:24 +0000 (13:40 +0100)
src/libutil/radix.c

index 0d51d77f73bc7bc81f7454972fc426605bd9deb5..d1d30b35398ee0f984ad6727df3c8dbe9d4deff2 100644 (file)
@@ -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 {