diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-02 14:19:13 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-12-03 13:35:26 +0100 |
commit | 61c422a88caefe986c2bc0a7f2f3028f696fa5cd (patch) | |
tree | 2cad95b84bee697060ff33c4e649662b2d19624c /print-juniper.c | |
parent | a5bb53dd7407207c012d901789d68e4b8a7054cf (diff) | |
download | tcpdump-61c422a88caefe986c2bc0a7f2f3028f696fa5cd.tar.gz |
Use more the EXTRACT_U_1() macro (43/n)
In: if (... p[n] ...) ...
Diffstat (limited to 'print-juniper.c')
-rw-r--r-- | print-juniper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-juniper.c b/print-juniper.c index bd36fd2f..e36b0a8f 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -974,7 +974,7 @@ juniper_atm1_if_print(netdissect_options *ndo, return l2info.header_len; } - if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */ + if (EXTRACT_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */ isoclns_print(ndo, p + 1, l2info.length - 1); /* FIXME check if frame was recognized */ return l2info.header_len; @@ -1034,7 +1034,7 @@ juniper_atm2_if_print(netdissect_options *ndo, return l2info.header_len; } - if (p[0] == 0x03) { /* Cisco style NLPID encaps ? */ + if (EXTRACT_U_1(p) == 0x03) { /* Cisco style NLPID encaps ? */ isoclns_print(ndo, p + 1, l2info.length - 1); /* FIXME check if frame was recognized */ return l2info.header_len; @@ -1342,7 +1342,7 @@ juniper_parse_header(netdissect_options *ndo, #ifdef DLT_JUNIPER_MFR /* MFR child links don't carry cookies */ if (l2info->pictype == DLT_JUNIPER_MFR && - (p[0] & MFR_BE_MASK) == MFR_BE_MASK) { + (EXTRACT_U_1(p) & MFR_BE_MASK) == MFR_BE_MASK) { l2info->cookie_len = 0; } #endif |