lib: reserve 'result' for CURLcode

For consistency, whereever we use a local variable named 'result' that
is a CURLcode type. Make other types use other names.

Closes #21244
This commit is contained in:
Daniel Stenberg 2026-04-06 22:21:12 +02:00
parent 4cb4f9d602
commit 9f5d1a38d1
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 66 additions and 67 deletions

View file

@ -375,7 +375,7 @@ int Curl_cpool_check_limits(struct Curl_easy *data,
size_t dest_limit = 0;
size_t total_limit = 0;
size_t shutdowns;
int result = CPOOL_LIMIT_OK;
int res = CPOOL_LIMIT_OK;
if(!cpool)
return CPOOL_LIMIT_OK;
@ -425,7 +425,7 @@ int Curl_cpool_check_limits(struct Curl_easy *data,
shutdowns = Curl_cshutdn_dest_count(cpool->idata, conn->destination);
}
if((live + shutdowns) >= dest_limit) {
result = CPOOL_LIMIT_DEST;
res = CPOOL_LIMIT_DEST;
goto out;
}
}
@ -453,14 +453,14 @@ int Curl_cpool_check_limits(struct Curl_easy *data,
shutdowns = Curl_cshutdn_count(cpool->idata);
}
if((cpool->num_conn + shutdowns) >= total_limit) {
result = CPOOL_LIMIT_TOTAL;
res = CPOOL_LIMIT_TOTAL;
goto out;
}
}
out:
CPOOL_UNLOCK(cpool, cpool->idata);
return result;
return res;
}
CURLcode Curl_cpool_add(struct Curl_easy *data,
@ -626,7 +626,7 @@ bool Curl_cpool_find(struct Curl_easy *data,
}
if(done_cb) {
result = done_cb(result, userdata);
result = done_cb(userdata);
}
CPOOL_UNLOCK(cpool, data);
return result;