From: Donald Sharp Date: Tue, 21 Aug 2018 01:07:33 +0000 (-0400) Subject: ospfd: Modify ospf_ri.c to use new error-code subsystem X-Git-Tag: frr-7.1-dev~371^2~16 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1dd58cc81166c93069f2bfb477ae014814dc4286;p=mirror%2Ffrr.git ospfd: Modify ospf_ri.c to use new error-code subsystem Signed-off-by: Donald Sharp --- diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index c5e0cd3873..2c813c3076 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -201,8 +201,7 @@ static int ospf_router_info_unregister() if ((OspfRI.scope != OSPF_OPAQUE_AS_LSA) && (OspfRI.scope != OSPF_OPAQUE_AREA_LSA)) { - zlog_warn( - "Unable to unregister Router Info functions: Wrong scope!"); + assert("Unable to unregister Router Info functions: Wrong scope!" == NULL); return -1; } @@ -813,11 +812,7 @@ static int ospf_router_info_lsa_originate1(void *arg) } /* Create new Opaque-LSA/ROUTER INFORMATION instance. */ - if ((new = ospf_router_info_lsa_new()) == NULL) { - zlog_warn( - "ospf_router_info_lsa_originate1: ospf_router_info_lsa_new() ?"); - return rc; - } + new = ospf_router_info_lsa_new(); new->vrf_id = vrf_id; /* Get ospf info */ @@ -924,11 +919,7 @@ static struct ospf_lsa *ospf_router_info_lsa_refresh(struct ospf_lsa *lsa) } /* Create new Opaque-LSA/ROUTER INFORMATION instance. */ - if ((new = ospf_router_info_lsa_new()) == NULL) { - zlog_warn( - "ospf_router_info_lsa_refresh: ospf_router_info_lsa_new() ?"); - return NULL; - } + new = ospf_router_info_lsa_new(); new->data->ls_seqnum = lsa_seqnum_increment(lsa); new->vrf_id = lsa->vrf_id;