]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't shadow errno.
authorGisle Vanem <[email protected]>
Tue, 14 Mar 2017 18:09:58 +0000 (11:09 -0700)
committerGuy Harris <[email protected]>
Tue, 14 Mar 2017 18:09:58 +0000 (11:09 -0700)
pcap.c

diff --git a/pcap.c b/pcap.c
index 97fa5dc4fd280cdd8e78436e61a1bf65f52e1827..6729ba81bead7a37a769c3cc2edf9ca160abe99e 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -2449,9 +2449,9 @@ pcap_strerror(int errnum)
 #ifdef HAVE_STRERROR
 #ifdef _WIN32
        static char errbuf[PCAP_ERRBUF_SIZE];
-       errno_t errno;
-       errno = strerror_s(errbuf, PCAP_ERRBUF_SIZE, errnum);
-       if (errno != 0) /* errno = 0 if successful */
+       errno_t err = strerror_s(errbuf, PCAP_ERRBUF_SIZE, errnum);
+
+       if (err != 0) /* err = 0 if successful */
                strlcpy(errbuf, "strerror_s() error", PCAP_ERRBUF_SIZE);
        return (errbuf);
 #else