From: guy Date: Fri, 3 Jan 2003 08:33:24 +0000 (+0000) Subject: Put in a comment noting that you probably should Not Worry and just Be X-Git-Tag: libpcap-0.8-bp~102 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/123b602037ef75ba26ddc56bf519f59a110c920a Put in a comment noting that you probably should Not Worry and just Be Happy even with the warnings about passing a "const char *" to "pfopen()". --- diff --git a/pcap-pf.c b/pcap-pf.c index 8b53840d..85210d88 100644 --- 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\