]> The Tcpdump Group git mirrors - libpcap/commitdiff
"install_bpf_program()" already sets "p->errbuf" to an error string if
authorguy <guy>
Sun, 3 Apr 2005 23:56:47 +0000 (23:56 +0000)
committerguy <guy>
Sun, 3 Apr 2005 23:56:47 +0000 (23:56 +0000)
it fails; there's no need for "dag_setfilter()" to do so.

pcap-dag.c

index 03ba11af457bb17d4f4f39868bcd673bde405b27..5aba689b0ecbe25c81836037fb7e9dc014953740 100644 (file)
@@ -15,7 +15,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
 
 #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
 #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 */
 
 
        /* 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;
                return -1;
-       }
 
        p->md.use_bpf = 0;
 
 
        p->md.use_bpf = 0;