connect: remove superfluous conditional

Commit dbd16c3e2 cleaned up the logic for traversing the addrinfos,
but the move left a conditional on ai which no longer is needed as
the while loop reevaluation will cover it.

Closes #7511
Reviewed-by: Carlo Marcelo Arenas Belón
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
Daniel Gustafsson 2021-07-30 09:40:15 +02:00
parent fbf26594e3
commit 3df8d08d00

View File

@ -589,12 +589,10 @@ static CURLcode trynextip(struct Curl_easy *data,
struct Curl_addrinfo *ai = conn->tempaddr[tempindex];
while(ai) {
if(ai) {
result = singleipconnect(data, conn, ai, tempindex);
if(result == CURLE_COULDNT_CONNECT) {
ai = ainext(conn, tempindex, TRUE);
continue;
}
result = singleipconnect(data, conn, ai, tempindex);
if(result == CURLE_COULDNT_CONNECT) {
ai = ainext(conn, tempindex, TRUE);
continue;
}
break;
}