From: Francois-Xavier Le Bail Date: Sat, 5 Dec 2020 15:02:55 +0000 (+0100) Subject: Juniper: Avoid testing ndo->ndo_eflag > 1 X-Git-Tag: tcpdump-4.99-bp~41 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/d27628f311b9afcf5ed6e4b0068e8ba6d6324b14 Juniper: Avoid testing ndo->ndo_eflag > 1 It's the only case where ndo->ndo_eflag is tested > 1. It's not documented we could use -ee[...]. To print more details, we already have -v[v]... (if needed). Using -e[e]... could add some confusion. This also add more complexity on a test matrix: ('', '-v', '-e', '-ve', -'vee', -vve, '-vvee', etc.). Thus replace this only case by ndo->ndo_eflag to only have to test ndo_eflag == 0 or ndo_eflag == 1. --- diff --git a/print-juniper.c b/print-juniper.c index 1560cee5..dafe48fa 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -1584,7 +1584,7 @@ juniper_parse_header(netdissect_options *ndo, break; } - if (ndo->ndo_eflag > 1) + if (ndo->ndo_eflag) ND_PRINT("hlen %u, proto 0x%04x, ", l2info->header_len, l2info->proto); return 1; /* everything went ok so far. continue parsing */