From: Guy Harris Date: Fri, 10 Nov 2017 21:18:53 +0000 (-0800) Subject: Cast the result of _beginthreadex() to HANDLE. X-Git-Tag: libpcap-1.9-bp~389 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/6472e2bbc09c1920d66bb8be7dc76f2157c7cfb5?ds=inline Cast the result of _beginthreadex() to HANDLE. --- diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c index dc931652..ae3caec6 100755 --- a/rpcapd/daemon.c +++ b/rpcapd/daemon.c @@ -1692,7 +1692,7 @@ static int daemon_msg_startcap_req(struct daemon_slpars *pars, uint32 plen, int // Now we have to create a new thread to receive packets #ifdef _WIN32 - *threaddata = _beginthreadex(NULL, 0, daemon_thrdatamain, (void *) session, NULL, 0); + *threaddata = (HANDLE)_beginthreadex(NULL, 0, daemon_thrdatamain, (void *) session, NULL, 0); if (*threaddata == 0) { pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread"); diff --git a/rpcapd/rpcapd.c b/rpcapd/rpcapd.c index 0f0f5805..539651a8 100755 --- a/rpcapd/rpcapd.c +++ b/rpcapd/rpcapd.c @@ -329,7 +329,7 @@ void main_startup(void) activelist[i].ai_family = mainhints.ai_family; #ifdef _WIN32 - threadId = _beginthreadex(NULL, 0, main_active, + threadId = (HANDLE)_beginthreadex(NULL, 0, main_active, (void *)&activelist[i], 0, NULL); if (threadId == 0) { @@ -393,7 +393,7 @@ void main_startup(void) *socktemp = sockmain; #ifdef _WIN32 - threadId = _beginthreadex(NULL, 0, main_passive, + threadId = (HANDLE)_beginthreadex(NULL, 0, main_passive, (void *) socktemp, 0, NULL); if (threadId == 0) {