aboutsummaryrefslogtreecommitdiff
path: root/print-tcp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-31 14:31:20 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-31 16:43:50 +0100
commit5922b80797378d98e7033523c3d62de353a87357 (patch)
tree3ac1877019ac61c7c4d48ada1af3c91e6c61ccf0 /print-tcp.c
parent90528d4c391d02bb61ad3bfc3f38586b40126608 (diff)
downloadtcpdump-5922b80797378d98e7033523c3d62de353a87357.tar.gz
Remove unneeded '&' when getting a pointer to a nd_ipv4 type
Diffstat (limited to 'print-tcp.c')
-rw-r--r--print-tcp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/print-tcp.c b/print-tcp.c
index 66579aab..6deb97b3 100644
--- a/print-tcp.c
+++ b/print-tcp.c
@@ -318,16 +318,20 @@ tcp_print(netdissect_options *ndo,
if (sport > dport)
rev = 1;
else if (sport == dport) {
- if (UNALIGNED_MEMCMP(&ip->ip_src, &ip->ip_dst, sizeof ip->ip_dst) > 0)
+ if (UNALIGNED_MEMCMP(ip->ip_src, ip->ip_dst, sizeof ip->ip_dst) > 0)
rev = 1;
}
if (rev) {
- UNALIGNED_MEMCPY(&tha.src, &ip->ip_dst, sizeof ip->ip_dst);
- UNALIGNED_MEMCPY(&tha.dst, &ip->ip_src, sizeof ip->ip_src);
+ UNALIGNED_MEMCPY(&tha.src, ip->ip_dst,
+ sizeof ip->ip_dst);
+ UNALIGNED_MEMCPY(&tha.dst, ip->ip_src,
+ sizeof ip->ip_src);
tha.port = dport << 16 | sport;
} else {
- UNALIGNED_MEMCPY(&tha.dst, &ip->ip_dst, sizeof ip->ip_dst);
- UNALIGNED_MEMCPY(&tha.src, &ip->ip_src, sizeof ip->ip_src);
+ UNALIGNED_MEMCPY(&tha.dst, ip->ip_dst,
+ sizeof ip->ip_dst);
+ UNALIGNED_MEMCPY(&tha.src, ip->ip_src,
+ sizeof ip->ip_src);
tha.port = sport << 16 | dport;
}