]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udld.c
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / print-udld.c
index 6833ed68c804ee4e3c78bcafa60e7c89832adcaa..94c325667699b792f59fee37123e3cdf5ecb10f7 100644 (file)
@@ -106,10 +106,10 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
 
     ND_TCHECK2(*tptr, UDLD_HEADER_LEN);
 
-    code = UDLD_EXTRACT_OPCODE(*tptr);
+    code = UDLD_EXTRACT_OPCODE(EXTRACT_U_1(tptr));
 
     ND_PRINT((ndo, "UDLDv%u, Code %s (%x), Flags [%s] (0x%02x), length %u",
-           UDLD_EXTRACT_VERSION(*tptr),
+           UDLD_EXTRACT_VERSION(EXTRACT_U_1(tptr)),
            tok2str(udld_code_values, "Reserved", code),
            code,
            bittok2str(udld_flags_values, "none", EXTRACT_U_1((tptr + 1))),
@@ -166,7 +166,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length)
         case UDLD_TIMEOUT_INTERVAL_TLV:
             if (len != 1)
                 goto invalid;
-            ND_PRINT((ndo, ", %us", (*tptr)));
+            ND_PRINT((ndo, ", %us", (EXTRACT_U_1(tptr))));
             break;
 
         case UDLD_SEQ_NUMBER_TLV: