From 8df455479f8801bbebad8839fc96abbffa711603 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 May 2020 00:05:04 +0200 Subject: 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 --- lib/connect.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/connect.c') diff --git a/lib/connect.c b/lib/connect.c index 1d26d7bc0..6eb33797b 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -166,7 +166,7 @@ tcpkeepalive(struct Curl_easy *data, static CURLcode singleipconnect(struct connectdata *conn, - const Curl_addrinfo *ai, /* start connecting to this */ + const struct Curl_addrinfo *ai, /* start connecting to this */ int tempindex); /* 0 or 1 among the temp ones */ /* @@ -558,11 +558,11 @@ static bool verifyconnect(curl_socket_t sockfd, int *error) /* update tempaddr[tempindex] (to the next entry), makes sure to stick to the correct family */ -static Curl_addrinfo *ainext(struct connectdata *conn, - int tempindex, - bool next) /* use current or next entry */ +static struct Curl_addrinfo *ainext(struct connectdata *conn, + int tempindex, + bool next) /* use current or next entry */ { - Curl_addrinfo *ai = conn->tempaddr[tempindex]; + struct Curl_addrinfo *ai = conn->tempaddr[tempindex]; if(ai && next) ai = ai->ai_next; while(ai && (ai->ai_family != conn->tempfamily[tempindex])) @@ -587,7 +587,7 @@ static CURLcode trynextip(struct connectdata *conn, conn->tempsock[tempindex] = CURL_SOCKET_BAD; if(sockindex == FIRSTSOCKET) { - Curl_addrinfo *ai = conn->tempaddr[tempindex]; + struct Curl_addrinfo *ai = conn->tempaddr[tempindex]; while(ai) { if(ai) { @@ -1113,7 +1113,7 @@ void Curl_sndbufset(curl_socket_t sockfd) * having connected. */ static CURLcode singleipconnect(struct connectdata *conn, - const Curl_addrinfo *ai, + const struct Curl_addrinfo *ai, int tempindex) { struct Curl_sockaddr_ex addr; @@ -1485,7 +1485,7 @@ int Curl_closesocket(struct connectdata *conn, * */ CURLcode Curl_socket(struct connectdata *conn, - const Curl_addrinfo *ai, + const struct Curl_addrinfo *ai, struct Curl_sockaddr_ex *addr, curl_socket_t *sockfd) { -- cgit v1.2.3