--- libaitio/src/Attic/patricia.c 2012/03/29 01:31:34 1.4 +++ libaitio/src/Attic/patricia.c 2012/07/03 08:51:05 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: patricia.c,v 1.4 2012/03/29 01:31:34 misho Exp $ +* $Id: patricia.c,v 1.5 2012/07/03 08:51:05 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -182,7 +182,7 @@ static prefix_t *New_Prefix2(int family, void *dest, i if (family == AF_INET6) { default_bitlen = 128; if (!prefix) { - prefix = calloc(1, sizeof(prefix6_t)); + prefix = io_calloc(1, sizeof(prefix6_t)); dynamic_allocated++; } memcpy(&prefix->add.sin6, dest, 16); @@ -190,7 +190,7 @@ static prefix_t *New_Prefix2(int family, void *dest, i #endif /* HAVE_IPV6 */ if (family == AF_INET) { if (!prefix) { - prefix = calloc(1, sizeof(prefix4_t)); + prefix = io_calloc(1, sizeof(prefix4_t)); dynamic_allocated++; } memcpy(&prefix->add.sin, dest, 4); @@ -313,7 +313,7 @@ inline patricia_tree_t *New_Patricia(int maxbits) { patricia_tree_t *patricia; - patricia = calloc(1, sizeof *patricia); + patricia = io_calloc(1, sizeof *patricia); patricia->maxbits = maxbits; patricia->head = NULL; @@ -567,7 +567,7 @@ inline patricia_node_t *patricia_lookup(patricia_tree_ assert(prefix->bitlen <= patricia->maxbits); if (!patricia->head) { - node = calloc(1, sizeof *node); + node = io_calloc(1, sizeof *node); node->bit = prefix->bitlen; node->prefix = Ref_Prefix(prefix); node->parent = NULL; @@ -677,7 +677,7 @@ inline patricia_node_t *patricia_lookup(patricia_tree_ return node; } - new_node = calloc(1, sizeof *new_node); + new_node = io_calloc(1, sizeof *new_node); new_node->bit = prefix->bitlen; new_node->prefix = Ref_Prefix (prefix); new_node->parent = NULL; @@ -723,7 +723,7 @@ inline patricia_node_t *patricia_lookup(patricia_tree_ prefix_toa(prefix), prefix->bitlen); #endif /* PATRICIA_DEBUG */ } else { - glue = calloc(1, sizeof *glue); + glue = io_calloc(1, sizeof *glue); glue->bit = differ_bit; glue->prefix = NULL; glue->parent = node->parent;