]> The Tcpdump Group git mirrors - libpcap/commitdiff
The third argument to pthread_create() is a function pointer, not a void *.
authorGuy Harris <[email protected]>
Sun, 19 Mar 2017 23:48:25 +0000 (16:48 -0700)
committerGuy Harris <[email protected]>
Sun, 19 Mar 2017 23:48:25 +0000 (16:48 -0700)
So don't cast it to void *.

rpcapd/daemon.c

index 3b2ab0100c9cdd3458fae60604a04b7871a87d82..6a9da4e42f6041dfa55d9050fb762eec6961c65f 100755 (executable)
@@ -1195,7 +1195,7 @@ static struct session *daemon_startcapture(SOCKET sockctrl, pthread_t *threaddat
        pthread_attr_setdetachstate(&detachedAttribute, PTHREAD_CREATE_DETACHED);
        
        // Now we have to create a new thread to receive packets
-       if (pthread_create(threaddata, &detachedAttribute, (void *) daemon_thrdatamain, (void *) session))
+       if (pthread_create(threaddata, &detachedAttribute, daemon_thrdatamain, (void *) session))
        {
                snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread");
                pthread_attr_destroy(&detachedAttribute);