]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Squelch a warning and get rid of a duplicate assignment.
authorGuy Harris <[email protected]>
Sun, 7 Aug 2016 23:00:04 +0000 (16:00 -0700)
committerGuy Harris <[email protected]>
Sun, 7 Aug 2016 23:00:04 +0000 (16:00 -0700)
print-pflog.c

index 9815dc56289939ca5a6c4f5c0079746b2377a609..b107c09d57c0431103034c978ed3c0250bb00e01 100644 (file)
@@ -119,7 +119,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
        }
 
 #define MIN_PFLOG_HDRLEN       45
-       hdr = (struct pfloghdr *)p;
+       hdr = (const struct pfloghdr *)p;
        if (hdr->length < MIN_PFLOG_HDRLEN) {
                ND_PRINT((ndo, "[pflog: invalid header length!]"));
                return (hdr->length);   /* XXX: not really */
@@ -132,7 +132,6 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
        }
 
        /* print what we know */
-       hdr = (struct pfloghdr *)p;
        ND_TCHECK(*hdr);
        if (ndo->ndo_eflag)
                pflog_print(ndo, hdr);