From: Denis Ovsienko Date: Fri, 17 Aug 2018 07:51:57 +0000 (+0100) Subject: EAP: simplify an if() X-Git-Tag: tcpdump-4.99-bp~1052 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/ecc344f32882d1392c952311212872c7739b3026 EAP: simplify an if() [skip ci] --- diff --git a/print-eap.c b/print-eap.c index 797224d6..ed2fb496 100644 --- a/print-eap.c +++ b/print-eap.c @@ -163,22 +163,15 @@ eap_print(netdissect_options *ndo, ND_TCHECK_SIZE(eap); eap_type = EXTRACT_U_1(eap->type); - /* in non-verbose mode just lets print the basic info */ - if (ndo->ndo_vflag < 1) { - ND_PRINT("%s (%u) v%u, len %u", - tok2str(eap_frame_type_values, "unknown", eap_type), - eap_type, - EXTRACT_U_1(eap->version), - EXTRACT_BE_U_2(eap->length)); - return; - } - ND_PRINT("%s (%u) v%u, len %u", tok2str(eap_frame_type_values, "unknown", eap_type), eap_type, EXTRACT_U_1(eap->version), EXTRACT_BE_U_2(eap->length)); + if (ndo->ndo_vflag < 1) + return; + tptr += sizeof(struct eap_frame_t); tlen -= sizeof(struct eap_frame_t);