]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Style update
[tcpdump] / print-tcp.c
index 554f8a61eaaa6b423509c6dbe761f4bb93087081..41392f99a1852435597660653d781c66722be619 100644 (file)
@@ -267,16 +267,16 @@ tcp_print(netdissect_options *ndo,
                         if (sport > dport)
                                 rev = 1;
                         else if (sport == dport) {
-                                if (UNALIGNED_MEMCMP(src, dst, sizeof ip6->ip6_dst) > 0)
+                                if (UNALIGNED_MEMCMP(src, dst, sizeof(ip6->ip6_dst)) > 0)
                                         rev = 1;
                         }
                         if (rev) {
-                                UNALIGNED_MEMCPY(&tha.src, dst, sizeof ip6->ip6_dst);
-                                UNALIGNED_MEMCPY(&tha.dst, src, sizeof ip6->ip6_src);
+                                UNALIGNED_MEMCPY(&tha.src, dst, sizeof(ip6->ip6_dst));
+                                UNALIGNED_MEMCPY(&tha.dst, src, sizeof(ip6->ip6_src));
                                 tha.port = dport << 16 | sport;
                         } else {
-                                UNALIGNED_MEMCPY(&tha.dst, dst, sizeof ip6->ip6_dst);
-                                UNALIGNED_MEMCPY(&tha.src, src, sizeof ip6->ip6_src);
+                                UNALIGNED_MEMCPY(&tha.dst, dst, sizeof(ip6->ip6_dst));
+                                UNALIGNED_MEMCPY(&tha.src, src, sizeof(ip6->ip6_src));
                                 tha.port = sport << 16 | dport;
                         }
 
@@ -318,20 +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);
+                                                 sizeof(ip->ip_dst));
                                 UNALIGNED_MEMCPY(&tha.dst, ip->ip_src,
-                                                 sizeof ip->ip_src);
+                                                 sizeof(ip->ip_src));
                                 tha.port = dport << 16 | sport;
                         } else {
                                 UNALIGNED_MEMCPY(&tha.dst, ip->ip_dst,
-                                                 sizeof ip->ip_dst);
+                                                 sizeof(ip->ip_dst));
                                 UNALIGNED_MEMCPY(&tha.src, ip->ip_src,
-                                                 sizeof ip->ip_src);
+                                                 sizeof(ip->ip_src));
                                 tha.port = sport << 16 | dport;
                         }