dect
/
libpcap
Archived
13
0
Fork 0

"install_bpf_program()" already sets "p->errbuf" to an error string if

it fails; there's no need for "dag_setfilter()" to do so.
This commit is contained in:
guy 2005-04-03 23:56:47 +00:00
parent 73a0081c01
commit ff5da1a402
1 changed files with 2 additions and 5 deletions

View File

@ -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;