diff options
-rw-r--r-- | print-802_11.c | 2 | ||||
-rw-r--r-- | print-decnet.c | 10 | ||||
-rw-r--r-- | print-sl.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/print-802_11.c b/print-802_11.c index a499edcc..f86fafe9 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -1983,7 +1983,7 @@ ieee_802_11_hdr_print(netdissect_options *ndo, } if (meshdrlen != 0) { const struct meshcntl_t *mc = - (const struct meshcntl_t *)&p[hdrlen - meshdrlen]; + (const struct meshcntl_t *)(p + hdrlen - meshdrlen); int ae = mc->flags & 3; ND_PRINT((ndo, "MeshData (AE %d TTL %u seq %u", ae, mc->ttl, diff --git a/print-decnet.c b/print-decnet.c index 563b1eb4..9eeff5f8 100644 --- a/print-decnet.c +++ b/print-decnet.c @@ -524,7 +524,7 @@ decnet_print(netdissect_options *ndo, } length = pktlen; - rhp = (const union routehdr *)&(ap[sizeof(short)]); + rhp = (const union routehdr *)(ap + sizeof(short)); ND_TCHECK(rhp->rh_short.sh_flags); mflags = EXTRACT_U_1(rhp->rh_short.sh_flags); @@ -541,7 +541,7 @@ decnet_print(netdissect_options *ndo, ap += padlen; length -= padlen; caplen -= padlen; - rhp = (const union routehdr *)&(ap[sizeof(short)]); + rhp = (const union routehdr *)(ap + sizeof(short)); ND_TCHECK(rhp->rh_short.sh_flags); mflags = EXTRACT_U_1(rhp->rh_short.sh_flags); } @@ -571,7 +571,7 @@ decnet_print(netdissect_options *ndo, src = EXTRACT_LE_U_2(rhp->rh_long.lg_src.dne_remote.dne_nodeaddr); hops = EXTRACT_U_1(rhp->rh_long.lg_visits); - nspp = &(ap[sizeof(short) + sizeof(struct longhdr)]); + nspp = ap + sizeof(short) + sizeof(struct longhdr); nsplen = length - sizeof(struct longhdr); break; case RMF_SHORT: @@ -579,7 +579,7 @@ decnet_print(netdissect_options *ndo, dst = EXTRACT_LE_U_2(rhp->rh_short.sh_dst); src = EXTRACT_LE_U_2(rhp->rh_short.sh_src); hops = (EXTRACT_U_1(rhp->rh_short.sh_visits) & VIS_MASK)+1; - nspp = &(ap[sizeof(short) + sizeof(struct shorthdr)]); + nspp = ap + sizeof(short) + sizeof(struct shorthdr); nsplen = length - sizeof(struct shorthdr); break; default: @@ -947,7 +947,7 @@ print_nsp(netdissect_options *ndo, { const struct seghdr *shp = (const struct seghdr *)nspp; const struct lsmsg *lsmp = - (const struct lsmsg *)&(nspp[sizeof(struct seghdr)]); + (const struct lsmsg *)(nspp + sizeof(struct seghdr)); int ack; int lsflags, fcval; @@ -167,7 +167,7 @@ sliplink_print(netdissect_options *ndo, * Get it from the link layer since sl_uncompress_tcp() * has restored the IP header copy to IPPROTO_TCP. */ - lastconn = ((const struct ip *)&p[SLX_CHDR])->ip_p; + lastconn = ((const struct ip *)(p + SLX_CHDR))->ip_p; ND_PRINT((ndo, "utcp %d: ", lastconn)); if (dir == -1) { /* Direction is bogus, don't use it */ |