]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the EXTRACT_U_1() macro (33/n)
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 29 Nov 2017 07:00:50 +0000 (08:00 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 29 Nov 2017 07:06:21 +0000 (08:06 +0100)
print-geneve.c
print-rrcp.c

index c8d55d889886a519b98c752e7b0e33e2a8c96f6d..280be187b3a22b421e31e2d3b305cb92e8349e43 100644 (file)
@@ -114,7 +114,7 @@ geneve_opts_print(netdissect_options *ndo, const u_char *bp, u_int len)
 
         opt_class = EXTRACT_BE_U_2(bp);
         opt_type = EXTRACT_U_1(bp + 2);
-        opt_len = 4 + ((*(bp + 3) & OPT_LEN_MASK) * 4);
+        opt_len = 4 + ((EXTRACT_U_1(bp + 3) & OPT_LEN_MASK) * 4);
 
         ND_PRINT((ndo, "class %s (0x%x) type 0x%x%s len %u",
                   format_opt_class(opt_class), opt_class, opt_type,
index e57be39b2f7a7be0faa07485b792a2f3246cac74..ddacf94c80c180ee03c793e66d36291a49f299ad 100644 (file)
@@ -125,7 +125,7 @@ rrcp_print(netdissect_options *ndo,
                  EXTRACT_BE_U_2(cp + RRCP_AUTHKEY_OFFSET)));
        }
        if (rrcp_proto==1 && rrcp_opcode==0 &&
-            ((*(cp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY)){
+            ((EXTRACT_U_1(cp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY)){
            ND_TCHECK_4(cp + RRCP_VENDOR_ID_OFFSET);
            ND_PRINT((ndo, " downlink_port=%d, uplink_port=%d, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ",
                     EXTRACT_U_1(cp + RRCP_DOWNLINK_PORT_OFFSET),