]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Modify ospf_ri.c to use new error-code subsystem
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 21 Aug 2018 01:07:33 +0000 (21:07 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:50:58 +0000 (20:50 +0000)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_ri.c

index c5e0cd3873371e3852d6a7afed855ef7a50bfd9c..2c813c3076d5c8eb1d4130a8858bc0ddef336b1b 100644 (file)
@@ -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;