diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-14 00:05:04 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-15 08:54:42 +0200 |
commit | 8df455479f8801bbebad8839fc96abbffa711603 (patch) | |
tree | ad0fcac278779ef75726f8aec6a061453c043282 /lib/asyn-ares.c | |
parent | 5d54b5e6971cf26b35d11980d6953bf436419752 (diff) | |
download | curl-8df455479f8801bbebad8839fc96abbffa711603.tar.gz |
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs
- Make checksrc complain on 'typedef struct {'
- Allow them in tests, public headers and examples
- Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
typedef different types/structs depending on build conditions.
Closes #5338
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r-- | lib/asyn-ares.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index aa28c7820..faabe1595 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -87,7 +87,8 @@ struct ResolverResults { int num_pending; /* number of ares_gethostbyname() requests */ - Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares parts */ + struct Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares + parts */ int last_status; struct curltime happy_eyeballs_dns_time; /* when this timer started, or 0 */ }; @@ -494,9 +495,9 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, /* Connects results to the list */ static void compound_results(struct ResolverResults *res, - Curl_addrinfo *ai) + struct Curl_addrinfo *ai) { - Curl_addrinfo *ai_tail; + struct Curl_addrinfo *ai_tail; if(!ai) return; ai_tail = ai; @@ -538,7 +539,7 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */ res->num_pending--; if(CURL_ASYNC_SUCCESS == status) { - Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port); + struct Curl_addrinfo *ai = Curl_he2ai(hostent, conn->async.port); if(ai) { compound_results(res, ai); } @@ -617,10 +618,10 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */ * memory we need to free after use. That memory *MUST* be freed with * Curl_freeaddrinfo(), nothing else. */ -Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) +struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn, + const char *hostname, + int port, + int *waitp) { char *bufp; struct Curl_easy *data = conn->data; |