diff options
author | paco <paco@voltanet.io> | 2018-06-18 19:07:24 +0200 |
---|---|---|
committer | paco <paco@voltanet.io> | 2018-06-18 19:07:24 +0200 |
commit | d11c6941dc5e3663891e61a4e24f94b4d0e6bd68 (patch) | |
tree | ebbd6ab6492b790eb742d0bf1ff9d8b98b862d92 /ospfd/ospf_snmp.c | |
parent | Merge pull request #2457 from pacovn/Coverity_1465491_Untrusted_value_as_argu... (diff) | |
download | frr-d11c6941dc5e3663891e61a4e24f94b4d0e6bd68.tar.xz frr-d11c6941dc5e3663891e61a4e24f94b4d0e6bd68.zip |
babeld, eigrpd, ospfd: unsigned negative check
After Cppcheck 1.72 feedback
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to '')
-rw-r--r-- | ospfd/ospf_snmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c index 6825be83a..c90db031d 100644 --- a/ospfd/ospf_snmp.c +++ b/ospfd/ospf_snmp.c @@ -1626,7 +1626,7 @@ static struct ospf_interface *ospfIfLookup(struct variable *v, oid *name, len = *length - v->namelen; if (len >= IN_ADDR_SIZE) len = IN_ADDR_SIZE; - if (len <= 0) + if (len == 0) ifaddr_next = 1; oid2in_addr(name + v->namelen, len, ifaddr); @@ -1990,7 +1990,7 @@ ospfVirtIfLookup(struct variable *v, oid *name, size_t *length, first = 0; len = *length - v->namelen; - if (len <= 0) + if (len == 0) first = 1; if (len > IN_ADDR_SIZE) len = IN_ADDR_SIZE; @@ -2176,7 +2176,7 @@ static struct ospf_neighbor *ospfNbrLookup(struct variable *v, oid *name, first = 0; len = *length - v->namelen; - if (len <= 0) + if (len == 0) first = 1; if (len > IN_ADDR_SIZE) |