From: Francois-Xavier Le Bail Date: Thu, 11 Jan 2018 22:06:48 +0000 (+0100) Subject: Remove unneeded '&' when getting a pointer to an nd_uintN_t type X-Git-Tag: tcpdump-4.99-bp~1465 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/f252fd6aeafc2a71d1736063025ee6d2d7aa2151 Remove unneeded '&' when getting a pointer to an nd_uintN_t type --- diff --git a/print-nfs.c b/print-nfs.c index d49693da..bba661fe 100644 --- a/print-nfs.c +++ b/print-nfs.c @@ -333,11 +333,11 @@ nfsreply_print(netdissect_options *ndo, if (!ndo->ndo_nflag) { strlcpy(srcid, "nfs", sizeof(srcid)); snprintf(dstid, sizeof(dstid), "%u", - EXTRACT_BE_U_4(&rp->rm_xid)); + EXTRACT_BE_U_4(rp->rm_xid)); } else { snprintf(srcid, sizeof(srcid), "%u", NFS_PORT); snprintf(dstid, sizeof(dstid), "%u", - EXTRACT_BE_U_4(&rp->rm_xid)); + EXTRACT_BE_U_4(rp->rm_xid)); } print_nfsaddr(ndo, bp2, srcid, dstid); diff --git a/print-udp.c b/print-udp.c index f9105502..ede213fc 100644 --- a/print-udp.c +++ b/print-udp.c @@ -450,7 +450,7 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length, case PT_RPC: rp = (const struct sunrpc_msg *)(up + 1); - 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 (direction == SUNRPC_CALL) sunrpc_print(ndo, (const u_char *)rp, length, (const u_char *)ip); @@ -521,15 +521,17 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length, rp = (const struct sunrpc_msg *)(up + 1); 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, length, (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, length, (const u_char *)ip); return;