]> The Tcpdump Group git mirrors - libpcap/commitdiff
dag_get_datalink() sets the error message; no need to set it after it fails.
authorGuy Harris <[email protected]>
Sun, 25 Nov 2018 18:22:02 +0000 (10:22 -0800)
committerGuy Harris <[email protected]>
Sun, 25 Nov 2018 18:22:02 +0000 (10:22 -0800)
If it returns a value < 0, it's already set the error message; we don't
have to do so in that case.

pcap-dag.c

index 91965bcb70ebbfb766910acf18fd416ad665ac8e..af7c81514574dfcdece8c4aab7afb1d7d7daf037 100644 (file)
@@ -968,8 +968,6 @@ static int dag_activate(pcap_t* p)
        p->linktype = -1;
        if (dag_get_datalink(p) < 0) {
                ret = PCAP_ERROR;
-               pcap_fmt_errmsg_for_errno(p->errbuf, PCAP_ERRBUF_SIZE,
-                   errno, "dag_get_datalink %s", device);
                goto failstop;
        }