]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-snmp.c
rt6: parse TLV
[tcpdump] / print-snmp.c
index 2819e855523e17c5c7c17d6b2e5e1f6ae7a21e12..1fc08f380515ef1360337097eeeb05ad84c38503 100644 (file)
@@ -1197,7 +1197,7 @@ varbind_print(netdissect_options *ndo,
               u_short pduid, const u_char *np, u_int length)
 {
        struct be elem;
-       int count = 0, ind;
+       int count = 0;
 #ifdef USE_LIBSMI
        SmiNode *smiNode = NULL;
 #endif
@@ -1217,7 +1217,7 @@ varbind_print(netdissect_options *ndo,
        length = elem.asnlen;
        np = (const u_char *)elem.data.raw;
 
-       for (ind = 1; length > 0; ind++) {
+       while (length) {
                const u_char *vbend;
                u_int vblength;