summaryrefslogtreecommitdiff
path: root/pcap-dag.c
diff options
context:
space:
mode:
authorguy <guy>2005-04-03 23:56:47 +0000
committerguy <guy>2005-04-03 23:56:47 +0000
commitff5da1a4027c16c5765c6c5fc040f532d4676e62 (patch)
tree2b9cda809a2282b40bce662153891702bed6daba /pcap-dag.c
parent73a0081c0125438f74240f2228ec4bf3021311fb (diff)
downloadlibpcap-ff5da1a4027c16c5765c6c5fc040f532d4676e62.tar.gz
"install_bpf_program()" already sets "p->errbuf" to an error string if
it fails; there's no need for "dag_setfilter()" to do so.
Diffstat (limited to 'pcap-dag.c')
-rw-r--r--pcap-dag.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pcap-dag.c b/pcap-dag.c
index 03ba11af..5aba689b 100644
--- a/pcap-dag.c
+++ b/pcap-dag.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.20 2005-01-21 10:11:39 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-dag.c,v 1.21 2005-04-03 23:56:47 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -658,11 +658,8 @@ dag_setfilter(pcap_t *p, struct bpf_program *fp)
/* Make our private copy of the filter */
- if (install_bpf_program(p, fp) < 0) {
- snprintf(p->errbuf, sizeof(p->errbuf),
- "malloc: %s", pcap_strerror(errno));
+ if (install_bpf_program(p, fp) < 0)
return -1;
- }
p->md.use_bpf = 0;