From: Guy Harris Date: Mon, 7 Jul 2014 21:22:08 +0000 (-0700) Subject: Get rid of fetch whose result isn't used. X-Git-Tag: tcpdump-4.6.1~8 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/46eb1214e6e1040ecfef8f68d6cfdd6668e739e0 Get rid of fetch whose result isn't used. 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). --- diff --git a/print-lldp.c b/print-lldp.c index 3564e568..e499507b 100644 --- a/print-lldp.c +++ b/print-lldp.c @@ -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)); }