]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: fix clang warning & ci-ospf test
authorChirag Shah <chirag@cumulusnetworks.com>
Wed, 6 Sep 2017 22:11:41 +0000 (15:11 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Tue, 3 Oct 2017 16:15:19 +0000 (09:15 -0700)
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
ospfd/ospf_apiserver.c
ospfd/ospf_vty.c

index 3b9d67af8137195312d7fba746f0e7a765ae36a8..252a5df0fdef44da505c2fc896355a6e9f8c1d20 100644 (file)
@@ -1376,7 +1376,7 @@ struct ospf_lsa *ospf_apiserver_opaque_lsa_new(struct ospf_area *area,
 
        struct ospf *ospf;
 
-       if (oi->ospf)
+       if (oi && oi->ospf)
                ospf = oi->ospf;
        else
                ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
index 062cf74c22c7c4d7edbf37a15a1b9bd671b28e93..d38a4ee73762d01b34c172476ffac99e1449e375 100644 (file)
@@ -8245,7 +8245,7 @@ static void show_ip_ospf_route_router(struct vty *vty, struct ospf *ospf,
        struct listnode *node;
        struct ospf_path *path;
 
-       /*vty_out(vty, "============ OSPF router routing table =============\n");*/
+       vty_out(vty, "============ OSPF router routing table =============\n");
        for (rn = route_top(rtrs); rn; rn = route_next(rn))
                if (rn->info) {
                        int flag = 0;
@@ -8396,7 +8396,6 @@ DEFUN (show_ip_ospf_border_routers,
        int ret = CMD_SUCCESS;
        int inst = 0;
        int idx_vrf = 0;
-       int count = 0;
 
        if (argv_find(argv, argc, "vrf", &idx_vrf)) {
                vrf_name = argv[idx_vrf + 1]->arg;
@@ -8408,10 +8407,6 @@ DEFUN (show_ip_ospf_border_routers,
                        for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) {
                                if (!ospf->oi_running)
                                        continue;
-                               count++;
-                               if (count == 1)
-                                       vty_out(vty,
-                                                "============ OSPF router routing table =============\n");
 
                                ret = show_ip_ospf_border_routers_common(vty,
                                                                         ospf);
@@ -8421,7 +8416,6 @@ DEFUN (show_ip_ospf_border_routers,
                        if (ospf == NULL || !ospf->oi_running)
                                return CMD_SUCCESS;
 
-                       vty_out(vty, "============ OSPF router routing table =============\n");
                        ret = show_ip_ospf_border_routers_common(vty, ospf);
                }
        } else {
@@ -8429,7 +8423,6 @@ DEFUN (show_ip_ospf_border_routers,
                ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
                if (ospf == NULL || !ospf->oi_running)
                        return CMD_SUCCESS;
-               vty_out(vty, "============ OSPF router routing table =============\n");
                ret = show_ip_ospf_border_routers_common(vty, ospf);
        }