diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-11-22 00:47:13 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-11-22 00:47:13 +0100 |
commit | 45559c4dfe3dca9312b9da4e78cf13563bd2acb8 (patch) | |
tree | 250df34b3719519c89f98d1a35cb95a5dfd7df63 /ospfd/ospf_nsm.c | |
parent | Merge pull request #5398 from taspelund/missed_newline (diff) | |
download | frr-45559c4dfe3dca9312b9da4e78cf13563bd2acb8.tar.xz frr-45559c4dfe3dca9312b9da4e78cf13563bd2acb8.zip |
ospfd: nbr->oi is never null
We test nbr->oi in a couple of places for null, but
in the majority of places of the nbr->oi data is being
used we just access it. Touch up code to trust this
assertion and make the code more consistent in others.
Found in Coverity.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r-- | ospfd/ospf_nsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index 110738802..9f6be3cbc 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -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: |