diff options
author | guy <guy> | 2005-04-03 23:56:47 +0000 |
---|---|---|
committer | guy <guy> | 2005-04-03 23:56:47 +0000 |
commit | ff5da1a4027c16c5765c6c5fc040f532d4676e62 (patch) | |
tree | 2b9cda809a2282b40bce662153891702bed6daba /pcap-dag.c | |
parent | 73a0081c0125438f74240f2228ec4bf3021311fb (diff) | |
download | libpcap-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; |