]> 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]>
Mon, 8 Jan 2018 17:40:03 +0000 (18:40 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 8 Jan 2018 17:40:34 +0000 (18:40 +0100)
print-frag6.c
print-ip.c
print-sunrpc.c
print-tcp.c

index 460f841f78f06c123ad0e4bb6d24ff0d72cd30a2..4d0f3ca498c168f0a4a144b849a38eba342ca9d7 100644 (file)
@@ -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
        {
index 868e4cfcca4fb8c37ea2cd3f66c4321da7aa2a97..da2d20fa74619ab1330dbb524ae342dd07e0c33c 100644 (file)
@@ -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),
index 5aeab50a316e41423a20cc3c2f714d1b3a1a2ad3..cc1febb452f87fb4f9b1a54ecc254294c04fde55 100644 (file)
@@ -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;
        }
 }
index 0646caa92706f6108aef7a25eeba07cda9025724..0199ce0715da7244fcb3984018b91bda4812d07b 100644 (file)
@@ -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;
                         }