]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_nsm.c
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / ospfd / ospf_nsm.c
index 110738802c5db15fe3f7587feb8922a02b96479f..0fc2cd60f904420b1fb0245a956dfe578509692a 100644 (file)
@@ -224,7 +224,7 @@ static int ospf_db_summary_add(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
        case OSPF_OPAQUE_LINK_LSA:
                /* Exclude type-9 LSAs that does not have the same "oi" with
                 * "nbr". */
-               if (nbr->oi && ospf_if_exists(lsa->oi) != nbr->oi)
+               if (ospf_if_exists(lsa->oi) != nbr->oi)
                        return 0;
                break;
        case OSPF_OPAQUE_AREA_LSA:
@@ -399,7 +399,7 @@ static int nsm_kill_nbr(struct ospf_neighbor *nbr)
 }
 
 /* Neighbor State Machine */
-struct {
+const struct {
        int (*func)(struct ospf_neighbor *);
        int next_state;
 } NSM[OSPF_NSM_STATE_MAX][OSPF_NSM_EVENT_MAX] = {
@@ -575,7 +575,7 @@ struct {
        },
 };
 
-static const char *ospf_nsm_event_str[] = {
+static const char *const ospf_nsm_event_str[] = {
        "NoEvent",         "PacketReceived",  "Start",
        "2-WayReceived",     "NegotiationDone", "ExchangeDone",
        "BadLSReq",       "LoadingDone",     "AdjOK?",