diff options
| author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-08 18:40:03 +0100 |
|---|---|---|
| committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-08 18:40:34 +0100 |
| commit | 83046fe18342b3874e5e66db69af15b437c7a879 (patch) | |
| tree | 3494f7ce68c4c1235f9435099fe045b604c2f71b | |
| parent | efe79869834e0fd2461ccab6350165c7a906d7c4 (diff) | |
| download | tcpdump-83046fe18342b3874e5e66db69af15b437c7a879.tar.gz | |
Remove unneeded '&' when getting a pointer to an nd_uintN_t type
| -rw-r--r-- | print-frag6.c | 12 | ||||
| -rw-r--r-- | print-ip.c | 6 | ||||
| -rw-r--r-- | print-sunrpc.c | 14 | ||||
| -rw-r--r-- | print-tcp.c | 8 |
4 files changed, 21 insertions, 19 deletions
diff --git a/print-frag6.c b/print-frag6.c index 460f841f..4d0f3ca4 100644 --- a/print-frag6.c +++ b/print-frag6.c @@ -45,19 +45,19 @@ frag6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2) if (ndo->ndo_vflag) { ND_PRINT("frag (0x%08x:%d|%ld)", - EXTRACT_BE_U_4(&dp->ip6f_ident), - EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK, - sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(&ip6->ip6_plen) - + EXTRACT_BE_U_4(dp->ip6f_ident), + EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, + sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(ip6->ip6_plen) - (long)(bp - bp2) - sizeof(struct ip6_frag)); } else { ND_PRINT("frag (%d|%ld)", - EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK, - sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(&ip6->ip6_plen) - + EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK, + sizeof(struct ip6_hdr) + EXTRACT_BE_U_2(ip6->ip6_plen) - (long)(bp - bp2) - sizeof(struct ip6_frag)); } /* it is meaningless to decode non-first fragment */ - if ((EXTRACT_BE_U_2(&dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) + if ((EXTRACT_BE_U_2(dp->ip6f_offlg) & IP6F_OFF_MASK) != 0) return -1; else { @@ -567,7 +567,7 @@ ip_print(netdissect_options *ndo, return; } - ipds->len = EXTRACT_BE_U_2(&ipds->ip->ip_len); + ipds->len = EXTRACT_BE_U_2(ipds->ip->ip_len); if (length < ipds->len) ND_PRINT("truncated-ip - %u bytes missing! ", ipds->len - length); @@ -596,7 +596,7 @@ ip_print(netdissect_options *ndo, ipds->len -= hlen; - ipds->off = EXTRACT_BE_U_2(&ipds->ip->ip_off); + ipds->off = EXTRACT_BE_U_2(ipds->ip->ip_off); ip_proto = EXTRACT_U_1(ipds->ip->ip_p); @@ -632,7 +632,7 @@ ip_print(netdissect_options *ndo, * For unfragmented datagrams, note the don't fragment flag. */ ND_PRINT(", id %u, offset %u, flags [%s], proto %s (%u)", - EXTRACT_BE_U_2(&ipds->ip->ip_id), + EXTRACT_BE_U_2(ipds->ip->ip_id), (ipds->off & 0x1fff) * 8, bittok2str(ip_frag_values, "none", ipds->off&0xe000), tok2str(ipproto_values, "unknown", ip_proto), diff --git a/print-sunrpc.c b/print-sunrpc.c index 5aeab50a..cc1febb4 100644 --- a/print-sunrpc.c +++ b/print-sunrpc.c @@ -178,11 +178,11 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp, if (!ndo->ndo_nflag) { snprintf(srcid, sizeof(srcid), "0x%x", - EXTRACT_BE_U_4(&rp->rm_xid)); + EXTRACT_BE_U_4(rp->rm_xid)); strlcpy(dstid, "sunrpc", sizeof(dstid)); } else { snprintf(srcid, sizeof(srcid), "0x%x", - EXTRACT_BE_U_4(&rp->rm_xid)); + EXTRACT_BE_U_4(rp->rm_xid)); snprintf(dstid, sizeof(dstid), "0x%x", SUNRPC_PMAPPORT); } @@ -205,23 +205,23 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp, } ND_PRINT(" %s", tok2str(proc2str, " proc #%u", - EXTRACT_BE_U_4(&rp->rm_call.cb_proc))); - x = EXTRACT_BE_U_4(&rp->rm_call.cb_rpcvers); + EXTRACT_BE_U_4(rp->rm_call.cb_proc))); + x = EXTRACT_BE_U_4(rp->rm_call.cb_rpcvers); if (x != 2) ND_PRINT(" [rpcver %u]", x); - switch (EXTRACT_BE_U_4(&rp->rm_call.cb_proc)) { + switch (EXTRACT_BE_U_4(rp->rm_call.cb_proc)) { case SUNRPC_PMAPPROC_SET: case SUNRPC_PMAPPROC_UNSET: case SUNRPC_PMAPPROC_GETPORT: case SUNRPC_PMAPPROC_CALLIT: - x = EXTRACT_BE_U_4(&rp->rm_call.cb_prog); + x = EXTRACT_BE_U_4(rp->rm_call.cb_prog); if (!ndo->ndo_nflag) ND_PRINT(" %s", progstr(x)); else ND_PRINT(" %u", x); - ND_PRINT(".%u", EXTRACT_BE_U_4(&rp->rm_call.cb_vers)); + ND_PRINT(".%u", EXTRACT_BE_U_4(rp->rm_call.cb_vers)); break; } } diff --git a/print-tcp.c b/print-tcp.c index 0646caa9..0199ce07 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -749,14 +749,16 @@ tcp_print(netdissect_options *ndo, fraglen = (length) - 4; rp = (const struct sunrpc_msg *)(bp + 4); if (ND_TTEST(rp->rm_direction)) { - direction = (enum sunrpc_msg_type) EXTRACT_BE_U_4(&rp->rm_direction); + direction = (enum sunrpc_msg_type) EXTRACT_BE_U_4(rp->rm_direction); if (dport == NFS_PORT && direction == SUNRPC_CALL) { - ND_PRINT(": NFS request xid %u ", EXTRACT_BE_U_4(&rp->rm_xid)); + ND_PRINT(": NFS request xid %u ", + EXTRACT_BE_U_4(rp->rm_xid)); nfsreq_noaddr_print(ndo, (const u_char *)rp, fraglen, (const u_char *)ip); return; } if (sport == NFS_PORT && direction == SUNRPC_REPLY) { - ND_PRINT(": NFS reply xid %u ", EXTRACT_BE_U_4(&rp->rm_xid)); + ND_PRINT(": NFS reply xid %u ", + EXTRACT_BE_U_4(rp->rm_xid)); nfsreply_noaddr_print(ndo, (const u_char *)rp, fraglen, (const u_char *)ip); return; } |
