]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
asyn-thread: fix mutex refs and unused variable in no-`HAVE_GETADDRINFO` builds
authorViktor Szakats <commit@vsz.me>
Mon, 17 Feb 2025 13:51:02 +0000 (14:51 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 17 Feb 2025 15:59:57 +0000 (16:59 +0100)
Follow-up to 074048ae803a817e39df198c61c2d9d87ec3585f #16321
Follow-up to 2ee754d830da084c386d1f1778de5e00fb1c348e #16323
Closes #16370

lib/asyn-thread.c

index 1770d14606a90dd1ca36c76d167acc046c073c1d..8a938c425ab94c0434d1d000d052066ca0307b54 100644 (file)
@@ -336,15 +336,15 @@ CURL_STDCALL gethostbyname_thread(void *arg)
       tsd->sock_error = RESOLVER_ENOMEM;
   }
 
-  Curl_mutex_acquire(tsd->mtx);
+  Curl_mutex_acquire(&tsd->mutx);
   if(tsd->done) {
     /* too late, gotta clean up the mess */
-    Curl_mutex_release(tsd->mtx);
+    Curl_mutex_release(&tsd->mutx);
     destroy_thread_sync_data(tsd);
   }
   else {
     tsd->done = TRUE;
-    Curl_mutex_release(tsd->mtx);
+    Curl_mutex_release(&tsd->mutx);
   }
 
   return 0;
@@ -682,8 +682,6 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
                                                 int port,
                                                 int *waitp)
 {
-  struct thread_data *td = &data->state.async.thdata;
-
   *waitp = 0; /* default to synchronous response */
 
   /* fire up a new resolver thread! */