summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2018-02-15 21:38:18 +0100
committerGitHub <noreply@github.com>2018-02-15 21:38:18 +0100
commita8bcd68f1c4aae077a4b0dc876ef2abaca5ba907 (patch)
tree0032985006b7d3ecabecc23c156c29ff90e22a27 /ospfd
parentMerge pull request #1742 from chiragshah6/mdev (diff)
parentzebra: Clean up some SA issues found by new code (diff)
downloadfrr-a8bcd68f1c4aae077a4b0dc876ef2abaca5ba907.tar.xz
frr-a8bcd68f1c4aae077a4b0dc876ef2abaca5ba907.zip
Merge pull request #1752 from donaldsharp/coverity_1
Coverity 1
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_ext.c2
-rw-r--r--ospfd/ospf_flood.c1
-rw-r--r--ospfd/ospf_sr.c10
3 files changed, 3 insertions, 10 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index d42476b6d..d7faf4b0d 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -175,7 +175,7 @@ void ospf_ext_term(void)
{
if ((OspfEXT.scope != OSPF_OPAQUE_AREA_LSA)
- || (OspfEXT.scope != OSPF_OPAQUE_AS_LSA))
+ && (OspfEXT.scope != OSPF_OPAQUE_AS_LSA))
zlog_warn(
"EXT: Unable to unregister Extended Prefix "
"Opaque LSA functions: Wrong scope!");
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index 36b6d5143..7ad9cf9f2 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -563,6 +563,7 @@ int ospf_flood_through_area(struct ospf_area *area, struct ospf_neighbor *inbr,
struct ospf_interface *oi;
int lsa_ack_flag = 0;
+ assert(area);
/* All other types are specific to a single area (Area A). The
eligible interfaces are all those interfaces attaching to the
Area A. If Area A is the backbone, this includes all the virtual
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index c6649a7a0..9827eac71 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -149,14 +149,6 @@ static struct sr_node *sr_node_new(struct in_addr *rid)
new->ext_link->del = del_sr_link;
new->ext_prefix->del = del_sr_pref;
- /* Check if list are correctly created */
- if (new->ext_link == NULL || new->ext_prefix == NULL) {
- list_delete_original(new->ext_link);
- list_delete_original(new->ext_prefix);
- XFREE(MTYPE_OSPF_SR_PARAMS, new);
- return NULL;
- }
-
IPV4_ADDR_COPY(&new->adv_router, rid);
new->neighbor = NULL;
new->instance = 0;
@@ -440,7 +432,7 @@ static struct ospf_path *get_nexthop_by_addr(struct ospf *top,
struct route_node *rn;
/* Sanity Check */
- if ((top == NULL) && (top->new_table))
+ if (top == NULL)
return NULL;
if (IS_DEBUG_OSPF_SR)