]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Don't assign to values that are never read 1547/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 13 Dec 2017 15:58:55 +0000 (10:58 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 14 Dec 2017 15:43:53 +0000 (10:43 -0500)
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>
ospf6d/ospf6_snmp.c

index c148107449a6f2f3375b8bcbe2cfa26bdee000ba..a4486459600574938c291689923d09792398d8b6 100644 (file)
@@ -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) {
@@ -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);
@@ -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);