]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
Clean up whitespaces
[tcpdump] / print-tcp.c
index 4b605733ff483dc1577e63a8081b46bd80fba672..1b8fb4c4873daafde7d5a55c68cde47049afa26f 100644 (file)
@@ -136,7 +136,7 @@ static const struct tok tcp_option_values[] = {
         { 0, NULL }
 };
 
-static int
+static uint16_t
 tcp_cksum(netdissect_options *ndo,
           const struct ip *ip,
           const struct tcphdr *tp,
@@ -146,7 +146,7 @@ tcp_cksum(netdissect_options *ndo,
                                 IPPROTO_TCP);
 }
 
-static int
+static uint16_t
 tcp6_cksum(netdissect_options *ndo,
            const struct ip6_hdr *ip6,
            const struct tcphdr *tp,
@@ -543,7 +543,7 @@ tcp_print(netdissect_options *ndo,
                                         break;
 
                                 case SIGNATURE_INVALID:
-                                        ND_PRINT("invalid");
+                                        nd_print_invalid(ndo);
                                         break;
 
                                 case CANT_CHECK_SIGNATURE:
@@ -572,7 +572,7 @@ tcp_print(netdissect_options *ndo,
                                  * at this point.)
                                  */
                                 if (datalen < 2) {
-                                        ND_PRINT(" invalid");
+                                        nd_print_invalid(ndo);
                                 } else {
                                         LENCHECK(1);
                                         ND_PRINT(" keyid %u", EXTRACT_U_1(cp));
@@ -820,7 +820,7 @@ static void
 print_tcp_rst_data(netdissect_options *ndo,
                    const u_char *sp, u_int length)
 {
-        int c;
+        u_char c;
 
         ND_PRINT(ND_TTEST_LEN(sp, length) ? " [RST" : " [!RST");
         if (length > MAX_RST_DATA_LEN) {
@@ -851,7 +851,7 @@ print_tcp_fastopen_option(netdissect_options *ndo, const u_char *cp,
         } else {
                 /* Fast Open Cookie */
                 if (datalen % 2 != 0 || datalen < 4 || datalen > 16) {
-                        ND_PRINT(" invalid");
+                        nd_print_invalid(ndo);
                 } else {
                         ND_PRINT(" cookie ");
                         for (i = 0; i < datalen; ++i)