]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print.c
Compile with '-Wsign-compare' in devel mode if supported
[tcpdump] / print.c
diff --git a/print.c b/print.c
index 4cc35bab980d0789cf3f101aee1ef036b7115982..48374544f2034b1efb1671c65ddc03ea02db87bc 100644 (file)
--- a/print.c
+++ b/print.c
@@ -39,6 +39,8 @@
 #include "print.h"
 #include "netdissect-alloc.h"
 
+#include "pcap-missing.h"
+
 struct printer {
        if_printer f;
        int type;
@@ -68,7 +70,7 @@ static const struct printer printers[] = {
        { nflog_if_print,       DLT_NFLOG},
 #endif
 #ifdef DLT_CIP
-       { cip_if_print,         DLT_CIP },
+       { cip_if_print,         DLT_CIP },
 #endif
 #ifdef DLT_ATM_CLIP
        { cip_if_print,         DLT_ATM_CLIP },
@@ -241,11 +243,9 @@ static int ndo_printf(netdissect_options *ndo,
                     PRINTFLIKE(2, 3);
 
 void
-init_print(netdissect_options *ndo, uint32_t localnet, uint32_t mask,
-          uint32_t timezone_offset)
+init_print(netdissect_options *ndo, uint32_t localnet, uint32_t mask)
 {
 
-       thiszone = timezone_offset;
        init_addrtoname(ndo, localnet, mask);
        init_checksum();
 }
@@ -320,11 +320,11 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h,
        u_int hdrlen;
        int invalid_header = 0;
 
-       if(ndo->ndo_packet_number)
+       if (ndo->ndo_packet_number)
                ND_PRINT("%5u  ", packets_captured);
 
        /* Sanity checks on packet length / capture length */
-       if(h->caplen == 0) {
+       if (h->caplen == 0) {
                invalid_header = 1;
                ND_PRINT("[Invalid header: caplen==0");
        }
@@ -471,7 +471,7 @@ ndo_error(netdissect_options *ndo, status_exit_codes_t status,
 {
        va_list ap;
 
-       if(ndo->program_name)
+       if (ndo->program_name)
                (void)fprintf(stderr, "%s: ", ndo->program_name);
        va_start(ap, fmt);
        (void)vfprintf(stderr, fmt, ap);
@@ -492,7 +492,7 @@ ndo_warning(netdissect_options *ndo, const char *fmt, ...)
 {
        va_list ap;
 
-       if(ndo->program_name)
+       if (ndo->program_name)
                (void)fprintf(stderr, "%s: ", ndo->program_name);
        (void)fprintf(stderr, "WARNING: ");
        va_start(ap, fmt);