if (trie)
{
/* CLI linpool is moved to trie, because trie is need for longer time
- than the linpool would exist in CLI. The linpool is freed in channel_reload_out_done_main */
+ * than the linpool would exist in CLI. The linpool is freed in channel_reload_out_done_main.
+ */
ASSERT_DIE(this_cli->parser_pool == prr->trie->lp);
rmove(this_cli->parser_pool, &root_pool);
this_cli->parser_pool = lp_new(this_cli->pool);
/* Ignore non-BGP channels */
if (C->class != &channel_bgp)
{
- if (cir)
- cir->done(cir);
+ cir->done(cir);
return 1;
}
- if (cir)
+ if (cir->trie)
{
- if (cir->trie)
- {
- cir->done(cir);
- return 0;
- }
- /* We do not need cir anymore and later we will not be able to detect when to free it. */
cir->done(cir);
+ return 0;
}
+ /* We do not need cir anymore and later we will not be able to detect when to free it. */
+ cir->done(cir);
ASSERT(p->conn && p->route_refresh);
bgp_schedule_packet(p->conn, c, PKT_ROUTE_REFRESH);
ospf_reload_routes(struct channel *C, struct channel_import_request *cir)
{
struct ospf_proto *p = (struct ospf_proto *) C->proto;
- if (cir) {
- cir->next = p->cir;
- p->cir = cir;
- }
+ cir->next = p->cir;
+ p->cir = cir;
+
if (p->calcrt == 2)
return 1;
channel_request_feeding((C == p->pri) ? p->sec : p->pri, &reload->cfr);
}
else{
- if(cir)
- cir->done(cir);
+ cir->done(cir);
/* Route reload on one channel is just refeed on the other */
channel_request_feeding_dynamic((C == p->pri) ? p->sec : p->pri, CFRT_DIRECT);
}
rip_reload_routes(struct channel *C, struct channel_import_request *cir)
{
struct rip_proto *p = (struct rip_proto *) C->proto;
- if (cir) {
- cir->next = p->cir;
- p->cir = cir;
- }
+
+ cir->next = p->cir;
+ p->cir = cir;
+
if (p->rt_reload)
return 1;
TRACE(D_EVENTS, "Scheduling route reload");
- if (cir && cir->trie)
+ if (cir->trie)
static_mark_partial(p, cir);
else
- {
- if (cir)
- cir->done(cir);
static_mark_all(p);
- }
+
return 1;
}