]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lib/patricia.c
merge
[irc/quakenet/newserv.git] / lib / patricia.c
index d3dfb223860e31e1ff49ace83286d0fab91becb5..441b09e6803b2af4097865bce530430cd6e7196f 100644 (file)
@@ -16,7 +16,6 @@ static char copyright[] =
 "This product includes software developed by the University of Michigan, Merit"
 "Network, Inc., and their contributors.";
 
-#include <malloc.h>
 #include <assert.h> /* assert */
 #include <ctype.h> /* isdigit */
 #include <errno.h> /* errno */
@@ -322,6 +321,7 @@ patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
        node->prefix = patricia_ref_prefix (prefix);
        node->parent = NULL;
        node->l = node->r = NULL;
+       node->usercount = 0;
        patricia->head = node;
        patricia->num_active_node++;
        return (node);
@@ -393,6 +393,7 @@ patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
     new_node->prefix = patricia_ref_prefix (prefix);
     new_node->parent = NULL;
     new_node->l = new_node->r = NULL;
+    new_node->usercount = 0;
     patricia->num_active_node++;
 
     if (node->bit == differ_bit) {
@@ -435,6 +436,7 @@ patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
         glue->bit = differ_bit;
         glue->prefix = NULL;
         glue->parent = node->parent;
+        glue->usercount = 0;
         patricia->num_active_node++;
        if (differ_bit < patricia->maxbits &&
            (addr[differ_bit >> 3]) & (0x80 >> (differ_bit & 0x07))) {