tool_operate: use curlx_str_number intead of atoi

For consistency. This instance is for debug-only code and is not
important.

Closes #19480
This commit is contained in:
Daniel Stenberg 2025-11-12 09:30:37 +01:00
parent 4841e4290d
commit 4bb6a5d50f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -310,10 +310,11 @@ static CURLcode pre_transfer(struct per_transfer *per)
#ifdef DEBUGBUILD
/* allow dedicated test cases to override */
{
char *ev = getenv("CURL_UPLOAD_SIZE");
const char *ev = getenv("CURL_UPLOAD_SIZE");
if(ev) {
int sz = atoi(ev);
uploadfilesize = (curl_off_t)sz;
curl_off_t sz;
curlx_str_number(&ev, &sz, CURL_OFF_T_MAX);
uploadfilesize = sz;
}
}
#endif