diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-03 21:12:03 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-03 21:51:36 +0100 |
commit | 4166458a2a6c4b779bc238ee3d2e555cee1bc416 (patch) | |
tree | fa412a28a457f50b1f7543e90e9e154cf08ba038 /print-isakmp.c | |
parent | c027ae2601efb06315f23d78e836e0deddbc3e39 (diff) | |
download | tcpdump-4166458a2a6c4b779bc238ee3d2e555cee1bc416.tar.gz |
Use more the EXTRACT_U_1() macro (46/n)
In: if (... p[n] ...) ...
Diffstat (limited to 'print-isakmp.c')
-rw-r--r-- | print-isakmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/print-isakmp.c b/print-isakmp.c index e5563631..641ee734 100644 --- a/print-isakmp.c +++ b/print-isakmp.c @@ -919,7 +919,7 @@ ikev1_attrmap_print(netdissect_options *ndo, uint32_t t, v; ND_TCHECK(p[0]); - if (p[0] & 0x80) + if (EXTRACT_U_1(p) & 0x80) totlen = 4; else { ND_TCHECK_2(p + 2); @@ -937,7 +937,7 @@ ikev1_attrmap_print(netdissect_options *ndo, ND_PRINT((ndo,"type=%s ", map[t].type)); else ND_PRINT((ndo,"type=#%d ", t)); - if (p[0] & 0x80) { + if (EXTRACT_U_1(p) & 0x80) { ND_PRINT((ndo,"value=")); ND_TCHECK_2(p + 2); v = EXTRACT_BE_U_2(p + 2); @@ -970,7 +970,7 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2) uint32_t t; ND_TCHECK(p[0]); - if (p[0] & 0x80) + if (EXTRACT_U_1(p) & 0x80) totlen = 4; else { ND_TCHECK_2(p + 2); @@ -985,7 +985,7 @@ ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep2) ND_PRINT((ndo,"(")); t = EXTRACT_BE_U_2(p) & 0x7fff; ND_PRINT((ndo,"type=#%d ", t)); - if (p[0] & 0x80) { + if (EXTRACT_U_1(p) & 0x80) { ND_PRINT((ndo,"value=")); t = p[2]; if (!rawprint(ndo, (const uint8_t *)(p + 2), 2)) { |