]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use more the EXTRACT_U_1() macro (50/n)
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 9 Dec 2017 09:17:18 +0000 (10:17 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sat, 9 Dec 2017 09:17:18 +0000 (10:17 +0100)
print-802_11.c
print-ip.c

index 59d1f63d865f229a1f6a5df067295d1ce66b7ce2..a499edcce84ea06ee5aedc7d7489b240dce185c4 100644 (file)
@@ -1031,7 +1031,7 @@ parse_elements(netdissect_options *ndo,
                if (length < elementlen + 2)
                        return 0;
 
-               switch (*(p + offset)) {
+               switch (EXTRACT_U_1(p + offset)) {
                case E_SSID:
                        memcpy(&ssid, p + offset, 2);
                        offset += 2;
index b5f7a4380cf78b98f75065b838407959d346a2cc..0974fbad7641c7466d584744438da7a24d071e49 100644 (file)
@@ -707,7 +707,7 @@ ipN_print(netdissect_options *ndo, register const u_char *bp, register u_int len
        }
 
        ND_TCHECK_1(bp);
-       switch (*bp & 0xF0) {
+       switch (EXTRACT_U_1(bp) & 0xF0) {
        case 0x40:
                ip_print (ndo, bp, length);
                break;