Skip to content

Commit

Permalink
ospf6d: Don't assign to values that are never read
Browse files Browse the repository at this point in the history
offset and offsetlen are never used without reassigning
in the code.  So comment out the assignments and
in case we want to start using the code for snmp
changes in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Dec 14, 2017
1 parent b8ca17c commit a35bb96
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ospf6d/ospf6_snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ static u_char *ospfv3WwLsdbEntry(struct variable *v, oid *name, size_t *length,
if (len)
id = htonl(*offset);
offset += len;
offsetlen -= len;
//offsetlen -= len; // Add back in if we need it again

if (exact) {
if (v->magic & OSPFv3WWASTABLE) {
Expand Down Expand Up @@ -1080,8 +1080,8 @@ static u_char *ospfv3IfEntry(struct variable *v, oid *name, size_t *length,
len = (offsetlen < 1 ? 0 : 1);
if (len)
instid = *offset;
offset += len;
offsetlen -= len;
//offset += len; // Add back in if we ever start using again
//offsetlen -= len;

if (exact) {
oi = ospf6_interface_lookup_by_ifindex(ifindex);
Expand Down Expand Up @@ -1241,8 +1241,8 @@ static u_char *ospfv3NbrEntry(struct variable *v, oid *name, size_t *length,
len = (offsetlen < 1 ? 0 : 1);
if (len)
rtrid = htonl(*offset);
offset += len;
offsetlen -= len;
//offset += len; // Add back in if we ever start looking at data
//offsetlen -= len;

if (exact) {
oi = ospf6_interface_lookup_by_ifindex(ifindex);
Expand Down

0 comments on commit a35bb96

Please sign in to comment.