]> The Tcpdump Group git mirrors - libpcap/commitdiff
Put in a comment noting that you probably should Not Worry and just Be
authorguy <guy>
Fri, 3 Jan 2003 08:33:24 +0000 (08:33 +0000)
committerguy <guy>
Fri, 3 Jan 2003 08:33:24 +0000 (08:33 +0000)
Happy even with the warnings about passing a "const char *" to
"pfopen()".

pcap-pf.c

index 8b53840d1360552402f57e680b66190fb0a425c8..85210d88e9ae7324e70f2316876e93dbe3b3cf02 100644 (file)
--- a/pcap-pf.c
+++ b/pcap-pf.c
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.71 2002-12-22 02:36:50 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.72 2003-01-03 08:33:24 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -254,6 +254,13 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
                return (0);
        }
        memset(p, 0, sizeof(*p));
+
+       /*
+        * XXX - we assume here that "pfopen()" does not, in fact, modify
+        * its argument, even though it takes a "char *" rather than a
+        * "const char *" as its first argument.  That appears to be
+        * the case, at least on Digital UNIX 4.0.
+        */
        p->fd = pfopen(device, O_RDONLY);
        if (p->fd < 0) {
                snprintf(ebuf, PCAP_ERRBUF_SIZE, "pf open: %s: %s\n\