]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Prevent store but never read of i
authorDonald Sharp <sharpd@nvidia.com>
Sun, 14 Feb 2021 21:08:07 +0000 (16:08 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sun, 14 Feb 2021 21:08:07 +0000 (16:08 -0500)
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>
bgpd/bgp_mplsvpn_snmp.c

index ef5556be17f90ccbab706cb9155aef843ce63333..055bae84326c60aa43b36e348d28a5fa41cd7c9e 100644 (file)
@@ -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;
                }
        }