cfilter: move a debug-only check into ifdef DEBUGBUILD

Pointed out by CodeSonar

Closes #20756
This commit is contained in:
Daniel Stenberg 2026-02-27 07:59:10 +01:00
parent b48d02179a
commit 61bcd1105a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1089,13 +1089,14 @@ CURLcode Curl_conn_send(struct Curl_easy *data, int sockindex,
const char *p = getenv("CURL_SMALLSENDS");
if(p) {
curl_off_t altsize;
if(!curlx_str_number(&p, &altsize, write_len))
if(!curlx_str_number(&p, &altsize, write_len)) {
write_len = (size_t)altsize;
if(write_len != len)
eos = FALSE;
}
}
}
#endif
if(write_len != len)
eos = FALSE;
if(data && data->conn && data->conn->send[sockindex])
return data->conn->send[sockindex](data, sockindex, buf, write_len, eos,
pnwritten);