mirror of
https://github.com/curl/curl.git
synced 2026-04-15 18:31:46 +03:00
asyn-thread: fix Curl_thread_create result check
- Compare to curl_thread_t_null instead of 0 for error. Currently for both supported thread libraries (pthreads and Windows) curl_thread_t_null is defined as 0. However, the pattern throughout the code is to check against curl_thread_t_null and not 0 since for posterity some thread library may not use 0 for error. Closes https://github.com/curl/curl/pull/13542
This commit is contained in:
parent
22cde3baa8
commit
62ae1f10e5
1 changed files with 1 additions and 1 deletions
|
|
@ -672,7 +672,7 @@ static bool init_resolve_thread(struct Curl_easy *data,
|
|||
td->thread_hnd = Curl_thread_create(gethostbyname_thread, &td->tsd);
|
||||
#endif
|
||||
|
||||
if(!td->thread_hnd) {
|
||||
if(td->thread_hnd == curl_thread_t_null) {
|
||||
/* The thread never started, so mark it as done here for proper cleanup. */
|
||||
td->tsd.done = 1;
|
||||
err = errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue