bug("Corrupted memory (node is not its parent's child)");
}
- node->parent = NULL;
- memset(node, 0xfe, sizeof(*node));
+ memset(node, 0, sizeof(*node));
}
/*
/*
* Check if @bucket is one of potential buckets of @node
*/
-static int
+static inline int
node_is_bucket_potential(const struct trie_node *node, const struct aggregator_bucket *bucket)
{
assert(node != NULL);
const ip_addr prefix = net_prefix(addr);
const u32 pxlen = net_pxlen(addr);
- struct trie_node *updated_node = aggregator_insert_prefix(p, prefix, pxlen, new->bucket);
+ struct trie_node * const updated_node = aggregator_insert_prefix(p, prefix, pxlen, new->bucket);
assert(updated_node != NULL);
assert(updated_node->original_bucket != NULL);
assert(updated_node->status == NON_FIB);
const ip_addr prefix = net_prefix(addr);
const u32 pxlen = net_pxlen(addr);
- struct trie_node *updated_node = aggregator_remove_prefix(p, prefix, pxlen);
+ struct trie_node * const updated_node = aggregator_remove_prefix(p, prefix, pxlen);
assert(updated_node != NULL);
struct trie_node *node = updated_node;