]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-tc.c
Add a routine to format error messages with an errno-based message at the end.
[libpcap] / pcap-tc.c
index 67584efaa882bc37f71cc344d31a20cb886470d3..194cdf13b8045a16e92943e36a71b18ec5c6ad0c 100644 (file)
--- a/pcap-tc.c
+++ b/pcap-tc.c
@@ -1130,8 +1130,8 @@ TcSetFilter(pcap_t *p, struct bpf_program *fp)
        /* Install a user level filter */
        if (install_bpf_program(p, fp) < 0)
        {
-               pcap_snprintf(p->errbuf, sizeof(p->errbuf),
-                       "setfilter, unable to install the filter: %s", pcap_strerror(errno));
+               pcap_fmt_errmsg_for_errno(p->errbuf, sizeof(p->errbuf),
+                   errno, "setfilter, unable to install the filter");
                return -1;
        }