]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove unneeded '&' when getting a pointer to an nd_uintN_t type
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 11 Jan 2018 22:06:48 +0000 (23:06 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 11 Jan 2018 22:06:48 +0000 (23:06 +0100)
print-nfs.c
print-udp.c

index d49693da2d45762a22674b4f33c279d0932f8788..bba661fe0ea507c0ca395c4b44d93cbcd089e944 100644 (file)
@@ -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);
 
index f9105502eabcd0ba980a762c4c68377b7774aeee..ede213fc374aa64c273391cc8f1c49c9703157c5 100644 (file)
@@ -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;