From: Francois-Xavier Le Bail Date: Thu, 13 Sep 2018 17:24:27 +0000 (+0200) Subject: SLL: Remove two useless tests X-Git-Tag: tcpdump-4.99-bp~1023 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/c6a5cc1bb49bcbc5f74c66bf780b8a1a05e8eb9d SLL: Remove two useless tests Because packet length (length) >= capture length (caplen). (see the sanity checks in print.c, pretty_print_packet() function) --- diff --git a/print-sll.c b/print-sll.c index 3c25a9a5..51526579 100644 --- a/print-sll.c +++ b/print-sll.c @@ -293,10 +293,6 @@ recurse: ND_PRINT("[|vlan]"); return (hdrlen + caplen); } - if (length < 4) { - ND_PRINT("[|vlan]"); - return (hdrlen + length); - } if (ndo->ndo_eflag) { uint16_t tag = EXTRACT_BE_U_2(p); @@ -484,10 +480,6 @@ recurse: ND_PRINT("[|vlan]"); return (hdrlen + caplen); } - if (length < 4) { - ND_PRINT("[|vlan]"); - return (hdrlen + length); - } if (ndo->ndo_eflag) { uint16_t tag = EXTRACT_BE_U_2(p);