diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-02-14 16:08:07 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-02-14 16:08:07 -0500 |
| commit | 227b6af0d7b85c76cb0b5963a31b52fe6afd1622 (patch) | |
| tree | 240a7d75a78f53e8d420a65170f70e34b2b664a0 | |
| parent | 8ca7a3ed38ae84d0f8d4870f789362522544542e (diff) | |
bgpd: Prevent store but never read of i
The new bgp_mplsvpn_snmp.c code increments i and
never uses that value. Comment the code out
to make the clang SA analyzer happy. Shouldn't
be a problem since this code will never probably
be touched again(ha!).
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | bgpd/bgp_mplsvpn_snmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_mplsvpn_snmp.c b/bgpd/bgp_mplsvpn_snmp.c index ef5556be17..055bae8432 100644 --- a/bgpd/bgp_mplsvpn_snmp.c +++ b/bgpd/bgp_mplsvpn_snmp.c @@ -1427,13 +1427,13 @@ static struct bgp_path_info *bgpL3vpnRte_lookup(struct variable *v, oid name[], nexthop.ipa_type = IPADDR_V4; oid2in_addr(&name[i], sizeof(struct in_addr), &nexthop.ip._v4_addr); - i += sizeof(struct in_addr); + /* i += sizeof(struct in_addr); */ break; case INETADDRESSTYPEIPV6: nexthop.ipa_type = IPADDR_V6; oid2in_addr(&name[i], sizeof(struct in6_addr), &nexthop.ip._v4_addr); /* sic */ - i += sizeof(struct in6_addr); + /* i += sizeof(struct in6_addr); */ break; } } |
