aboutsummaryrefslogtreecommitdiff
path: root/print-tcp.c
diff options
context:
space:
mode:
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;
}