]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
asyn-thread: make getaddrinfo_complete return CURLcode
authorDaniel Stenberg <daniel@haxx.se>
Tue, 12 Jul 2022 21:06:01 +0000 (23:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 13 Jul 2022 21:26:13 +0000 (23:26 +0200)
... as the only caller that cares about what it returns assumes that
anyway. This caused icc to warn:

asyn-thread.c(505): error #188: enumerated type mixed with another type
        result = getaddrinfo_complete(data);

Repoorted-by: Matthew Thompson
Bug: https://github.com/curl/curl/issues/9081#issuecomment-1182143076
Closes #9146

lib/asyn-thread.c

index d0edc32608fd62a8e650173e50cc3148eb1ee78c..92c38f266a7fbe4150d4f59ff6eed2cd83385001 100644 (file)
@@ -269,18 +269,18 @@ int init_thread_sync_data(struct thread_data *td,
   return 0;
 }
 
-static int getaddrinfo_complete(struct Curl_easy *data)
+static CURLcode getaddrinfo_complete(struct Curl_easy *data)
 {
   struct thread_sync_data *tsd = conn_thread_sync_data(data);
-  int rc;
+  CURLcode result;
 
-  rc = Curl_addrinfo_callback(data, tsd->sock_error, tsd->res);
+  result = Curl_addrinfo_callback(data, tsd->sock_error, tsd->res);
   /* The tsd->res structure has been copied to async.dns and perhaps the DNS
      cache.  Set our copy to NULL so destroy_thread_sync_data doesn't free it.
   */
   tsd->res = NULL;
 
-  return rc;
+  return result;
 }