diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-14 14:58:05 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2018-08-11 17:14:58 +0200 |
commit | 0ce1ca805d607cec2c0f75dac8950f40e75fc971 (patch) | |
tree | bf34e7a0084ae76089d43ee7f2c4ca8eeed62c8a /pimd/pim_rp.c | |
parent | Merge pull request #2809 from opensourcerouting/routemap-rpki-fix (diff) | |
download | frr-0ce1ca805d607cec2c0f75dac8950f40e75fc971.tar.xz frr-0ce1ca805d607cec2c0f75dac8950f40e75fc971.zip |
*: ALLOC calls cannot fail
There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening. So we can safely remove all of this code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rp.c')
-rw-r--r-- | pimd/pim_rp.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 783f93175..3b3e5eb69 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -102,19 +102,10 @@ void pim_rp_init(struct pim_instance *pim) struct route_node *rn; pim->rp_list = list_new(); - if (!pim->rp_list) { - zlog_err("Unable to alloc rp_list"); - return; - } pim->rp_list->del = (void (*)(void *))pim_rp_info_free; pim->rp_list->cmp = pim_rp_list_cmp; pim->rp_table = route_table_init(); - if (!pim->rp_table) { - zlog_err("Unable to alloc rp_table"); - list_delete_and_null(&pim->rp_list); - return; - } rp_info = XCALLOC(MTYPE_PIM_RP, sizeof(*rp_info)); @@ -133,14 +124,6 @@ void pim_rp_init(struct pim_instance *pim) listnode_add(pim->rp_list, rp_info); rn = route_node_get(pim->rp_table, &rp_info->group); - if (!rn) { - zlog_err("Failure to get route node for pim->rp_table"); - list_delete_and_null(&pim->rp_list); - route_table_finish(pim->rp_table); - XFREE(MTYPE_PIM_RP, rp_info); - return; - } - rn->info = rp_info; if (PIM_DEBUG_TRACE) zlog_debug( |