libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 2715cf264953db9368bfba0223fbaf03ccc71743
parent 8a462a087f5a58bdbca2f7a4384101f147992080
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue,  7 Nov 2017 22:08:08 +0300

Threads initialisation: reduce data race on W32

Diffstat:
Msrc/microhttpd/mhd_threads.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/microhttpd/mhd_threads.c b/src/microhttpd/mhd_threads.c @@ -210,7 +210,6 @@ MHD_create_thread_ (MHD_thread_handle_ID_ *thread, return !res; #elif defined(MHD_USE_W32_THREADS) - unsigned int thread_ID; #if SIZE_MAX != UINT_MAX if (stack_size > UINT_MAX) { @@ -225,12 +224,11 @@ MHD_create_thread_ (MHD_thread_handle_ID_ *thread, start_routine, arg, 0, - &thread_ID); + (unsigned*)&thread->ID); if ((MHD_thread_handle_)-1 == thread->handle) return 0; - thread->ID = (MHD_thread_ID_)thread_ID; return !0; #endif }