summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_snmp.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-01-28 20:56:11 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-01-28 20:56:11 +0100
commit153bdb3d03542530ed1deccbefc716cb4b699a67 (patch)
tree9f61a2e7fa34a2166843a033e1192866e5f4d199 /ospfd/ospf_snmp.c
parentpbrd: Remove #if 0 code (diff)
downloadfrr-153bdb3d03542530ed1deccbefc716cb4b699a67.tar.xz
frr-153bdb3d03542530ed1deccbefc716cb4b699a67.zip
ospfd: ospf_nbr_nbma_lookup_next always returns NULL
The calling function of ospf_nbr_nbma_lookup_next calls this function and then immediately returns when it gets the NULL. Just cleanup a bit more code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r--ospfd/ospf_snmp.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 66dd9c7ca..3f4ca44b0 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -1236,7 +1236,6 @@ static struct ospf_nbr_nbma *ospfHostLookup(struct variable *v, oid *name,
size_t *length,
struct in_addr *addr, int exact)
{
- int len;
struct ospf_nbr_nbma *nbr_nbma;
struct ospf *ospf;
@@ -1258,28 +1257,8 @@ static struct ospf_nbr_nbma *ospfHostLookup(struct variable *v, oid *name,
nbr_nbma = ospf_nbr_nbma_lookup(ospf, *addr);
return nbr_nbma;
- } else {
- len = *length - v->namelen;
- if (len > 4)
- len = 4;
-
- oid2in_addr(name + v->namelen, len, addr);
-
- nbr_nbma =
- ospf_nbr_nbma_lookup_next(ospf, addr, len == 0 ? 1 : 0);
-
- if (nbr_nbma == NULL)
- return NULL;
-
- oid_copy_addr(name + v->namelen, addr, IN_ADDR_SIZE);
-
- /* Set TOS 0. */
- name[v->namelen + IN_ADDR_SIZE] = 0;
-
- *length = v->namelen + IN_ADDR_SIZE + 1;
-
- return nbr_nbma;
}
+
return NULL;
}