]> The Tcpdump Group git mirrors - libpcap/commitdiff
It's INVALID_HANDLE_VALUE, not INVALID_HANDLE.
authorGuy Harris <[email protected]>
Thu, 7 Sep 2017 02:37:13 +0000 (19:37 -0700)
committerGuy Harris <[email protected]>
Thu, 7 Sep 2017 02:37:13 +0000 (19:37 -0700)
pcap.c

diff --git a/pcap.c b/pcap.c
index aafc25866d7115f675d36e5193aaf83eaf5d0ac2..fb5b13dc8416aebe846a203410d0678e78673924 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -1823,7 +1823,7 @@ pcap_alloc_pcap_t(char *ebuf, size_t size)
        p = (pcap_t *)chunk;
 
 #ifdef _WIN32
-       p->handle = INVALID_HANDLE;     /* not opened yet */
+       p->handle = INVALID_HANDLE_VALUE;       /* not opened yet */
 #else
        p->fd = -1;     /* not opened yet */
        p->selectable_fd = -1;
@@ -2779,7 +2779,7 @@ pcap_fileno(pcap_t *p)
 #ifndef _WIN32
        return (p->fd);
 #else
-       if (p->handle != INVALID_HANDLE)
+       if (p->handle != INVALID_HANDLE_VALUE)
                return ((int)(DWORD)p->handle);
        else
                return (PCAP_ERROR);