]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Get rid of fetch whose result isn't used.
authorGuy Harris <[email protected]>
Mon, 7 Jul 2014 21:22:08 +0000 (14:22 -0700)
committerGuy Harris <[email protected]>
Mon, 7 Jul 2014 21:22:40 +0000 (14:22 -0700)
Put in a comment to indicate what we're processing (and that we fetch
the entire array as a 32-bit number and extract the nibbles from it).

print-lldp.c

index 3564e568cdf773e7a9de557d58d8b492e2f08ed6..e499507bba7e80d7b082aa294d2695e0967dfc0c 100644 (file)
@@ -1180,9 +1180,12 @@ lldp_private_dcbx_print(netdissect_options *ndo,
            ND_PRINT((ndo, "\n\t      SubType: %d", *(tptr + 3)));
            ND_PRINT((ndo, "\n\t      Priority Allocation"));
 
+           /*
+            * Array of 8 4-bit priority group ID values; we fetch all
+            * 32 bits and extract each nibble.
+            */
            pgval = EXTRACT_32BITS(tptr+4);
            for (i = 0; i <= 7; i++) {
-               tval = *(tptr+4+(i/2));
                ND_PRINT((ndo, "\n\t          PgId_%d: %d",
                        i, (pgval >> (28 - 4 * i)) & 0xF));
            }