summaryrefslogtreecommitdiff
path: root/print-ipx.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-20 22:58:59 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2017-11-20 22:58:59 +0100
commit93bee2402670249e78478ee3c7ce998a5e2343e6 (patch)
treecda929c01da5da4feda8bee39f23a8d8981f6915 /print-ipx.c
parenta58370c17f5227919bb1e9619a6a413a90d3fa45 (diff)
downloadtcpdump-93bee2402670249e78478ee3c7ce998a5e2343e6.tar.gz
Use pointer expressions like in most similar cases
Diffstat (limited to 'print-ipx.c')
-rw-r--r--print-ipx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-ipx.c b/print-ipx.c
index c88c03a6..9574d477 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -165,7 +165,7 @@ ipx_sap_print(netdissect_options *ndo, const u_short *ipx, u_int length)
ND_PRINT((ndo, "ipx-sap-nearest-req"));
ND_TCHECK(ipx[0]);
- ND_PRINT((ndo, " %s", ipxsap_string(ndo, htons(EXTRACT_BE_16BITS(&ipx[0])))));
+ ND_PRINT((ndo, " %s", ipxsap_string(ndo, htons(EXTRACT_BE_16BITS(ipx)))));
break;
case 2:
@@ -177,14 +177,14 @@ ipx_sap_print(netdissect_options *ndo, const u_short *ipx, u_int length)
for (i = 0; i < 8 && length > 0; i++) {
ND_TCHECK(ipx[0]);
- ND_PRINT((ndo, " %s '", ipxsap_string(ndo, htons(EXTRACT_BE_16BITS(&ipx[0])))));
+ ND_PRINT((ndo, " %s '", ipxsap_string(ndo, htons(EXTRACT_BE_16BITS(ipx)))));
if (fn_printzp(ndo, (const u_char *)&ipx[1], 48, ndo->ndo_snapend)) {
ND_PRINT((ndo, "'"));
goto trunc;
}
ND_TCHECK2(ipx[25], 10);
ND_PRINT((ndo, "' addr %s",
- ipxaddr_string(EXTRACT_BE_32BITS(&ipx[25]), (const u_char *)&ipx[27])));
+ ipxaddr_string(EXTRACT_BE_32BITS(ipx + 25), (const u_char *)&ipx[27])));
ipx += 32;
length -= 64;
}
@@ -213,16 +213,16 @@ ipx_rip_print(netdissect_options *ndo, const u_short *ipx, u_int length)
ND_PRINT((ndo, "ipx-rip-req"));
if (length > 0) {
ND_TCHECK(ipx[3]);
- ND_PRINT((ndo, " %08x/%d.%d", EXTRACT_BE_32BITS(&ipx[0]),
- EXTRACT_BE_16BITS(&ipx[2]), EXTRACT_BE_16BITS(&ipx[3])));
+ ND_PRINT((ndo, " %08x/%d.%d", EXTRACT_BE_32BITS(ipx),
+ EXTRACT_BE_16BITS(ipx + 2), EXTRACT_BE_16BITS(ipx + 3)));
}
break;
case 2:
ND_PRINT((ndo, "ipx-rip-resp"));
for (i = 0; i < 50 && length > 0; i++) {
ND_TCHECK(ipx[3]);
- ND_PRINT((ndo, " %08x/%d.%d", EXTRACT_BE_32BITS(&ipx[0]),
- EXTRACT_BE_16BITS(&ipx[2]), EXTRACT_BE_16BITS(&ipx[3])));
+ ND_PRINT((ndo, " %08x/%d.%d", EXTRACT_BE_32BITS(ipx),
+ EXTRACT_BE_16BITS(ipx + 2), EXTRACT_BE_16BITS(ipx + 3)));
ipx += 4;
length -= 8;