diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-09 17:15:55 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-10 11:40:35 +0100 |
commit | 6bb65331a5f9d35186238af0ed736a3949616bc2 (patch) | |
tree | 0a444da5c885e8a62952429175c8fb74a0caa426 /print-smb.c | |
parent | 07ac438e08e5ffed3539e10d78f1cfc7d221d591 (diff) | |
download | tcpdump-6bb65331a5f9d35186238af0ed736a3949616bc2.tar.gz |
Use more the EXTRACT_U_1() macro (53/n)
Assignment, p[n], (more)
Diffstat (limited to 'print-smb.c')
-rw-r--r-- | print-smb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print-smb.c b/print-smb.c index 1e81fcc8..3ef92253 100644 --- a/print-smb.c +++ b/print-smb.c @@ -808,7 +808,7 @@ print_smb(netdissect_options *ndo, int smboffset; ND_TCHECK_1(buf + 9); - request = (buf[9] & 0x80) ? 0 : 1; + request = (EXTRACT_U_1(buf + 9) & 0x80) ? 0 : 1; startbuf = buf; command = EXTRACT_U_1(buf + 4); @@ -1112,10 +1112,10 @@ nbt_udp137_print(netdissect_options *ndo, ND_TCHECK_2(data + 10); name_trn_id = EXTRACT_BE_U_2(data); - response = (data[2] >> 7); - opcode = (data[2] >> 3) & 0xF; - nm_flags = ((data[2] & 0x7) << 4) + (data[3] >> 4); - rcode = data[3] & 0xF; + response = (EXTRACT_U_1(data + 2) >> 7); + opcode = (EXTRACT_U_1(data + 2) >> 3) & 0xF; + nm_flags = ((EXTRACT_U_1(data + 2) & 0x7) << 4) + (EXTRACT_U_1(data + 3) >> 4); + rcode = EXTRACT_U_1(data + 3) & 0xF; qdcount = EXTRACT_BE_U_2(data + 4); ancount = EXTRACT_BE_U_2(data + 6); nscount = EXTRACT_BE_U_2(data + 8); |