lib: reduce use of data->conn->

If there are more than two of them in a function, use a local 'conn'
variable instead.

Closes #19063
This commit is contained in:
Daniel Stenberg 2025-10-14 17:40:18 +02:00
parent 9441127394
commit ae5fb4188d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 62 additions and 50 deletions

View file

@ -3061,12 +3061,13 @@ static CURLcode ssh_pollset(struct Curl_easy *data,
struct easy_pollset *ps)
{
int flags = 0;
if(data->conn->waitfor & KEEP_RECV)
struct connectdata *conn = data->conn;
if(conn->waitfor & KEEP_RECV)
flags |= CURL_POLL_IN;
if(data->conn->waitfor & KEEP_SEND)
if(conn->waitfor & KEEP_SEND)
flags |= CURL_POLL_OUT;
return flags ?
Curl_pollset_change(data, ps, data->conn->sock[FIRSTSOCKET], flags, 0) :
Curl_pollset_change(data, ps, conn->sock[FIRSTSOCKET], flags, 0) :
CURLE_OK;
}