X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/be0115d574ef20890cb378c36747bc44bebc5704..c909e8a31ffcbb7f1a41bb801392e14f5d20e1fc:/pcap-netmap.c diff --git a/pcap-netmap.c b/pcap-netmap.c index 00e6e414..ee8d8b3a 100644 --- a/pcap-netmap.c +++ b/pcap-netmap.c @@ -193,9 +193,9 @@ pcap_netmap_activate(pcap_t *p) d = nm_open(p->opt.device, NULL, 0, NULL); if (d == NULL) { - pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE, - "netmap open: cannot access %s: %s\n", - p->opt.device, pcap_strerror(errno)); + pcap_fmt_errmsg_for_errno(p->errbuf, PCAP_ERRBUF_SIZE, + errno, "netmap open: cannot access %s", + p->opt.device); pcap_cleanup_live_common(p); return (PCAP_ERROR); }