]> The Tcpdump Group git mirrors - tcpdump/commitdiff
EAP: simplify an if()
authorDenis Ovsienko <[email protected]>
Fri, 17 Aug 2018 07:51:57 +0000 (08:51 +0100)
committerDenis Ovsienko <[email protected]>
Fri, 17 Aug 2018 07:54:15 +0000 (08:54 +0100)
[skip ci]

print-eap.c

index 797224d645fbdfcd3101c1586f756727bc01d706..ed2fb496d3eb2df5d81f18d6a31c647ecc8f753b 100644 (file)
@@ -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);