mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-12 09:28:46 +00:00
Add more assertions
This commit is contained in:
parent
7eb9175a09
commit
cdc90530ed
@ -283,6 +283,7 @@ first_pass_after_check(const struct trie_node *node)
|
|||||||
static void
|
static void
|
||||||
first_pass(struct trie_node *node, slab *trie_slab)
|
first_pass(struct trie_node *node, slab *trie_slab)
|
||||||
{
|
{
|
||||||
|
bug("");
|
||||||
assert(node != NULL);
|
assert(node != NULL);
|
||||||
assert(trie_slab != NULL);
|
assert(trie_slab != NULL);
|
||||||
|
|
||||||
@ -906,6 +907,9 @@ calculate_trie(struct aggregator_proto *p)
|
|||||||
static void
|
static void
|
||||||
run_aggregation(struct aggregator_proto *p)
|
run_aggregation(struct aggregator_proto *p)
|
||||||
{
|
{
|
||||||
|
assert(p->root != NULL);
|
||||||
|
log("==== AGGREGATION START ====");
|
||||||
|
|
||||||
construct_trie(p);
|
construct_trie(p);
|
||||||
calculate_trie(p);
|
calculate_trie(p);
|
||||||
collect_prefixes(p);
|
collect_prefixes(p);
|
||||||
@ -1483,6 +1487,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new
|
|||||||
sl_free(old_bucket);
|
sl_free(old_bucket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(p->root != NULL);
|
||||||
settle_kick(&p->aggr_timer);
|
settle_kick(&p->aggr_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1646,6 +1651,7 @@ aggregator_shutdown(struct proto *P)
|
|||||||
|
|
||||||
settle_cancel(&p->aggr_timer);
|
settle_cancel(&p->aggr_timer);
|
||||||
|
|
||||||
|
assert(p->root != NULL);
|
||||||
delete_trie(p->root);
|
delete_trie(p->root);
|
||||||
p->root = NULL;
|
p->root = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user