← Commit list

4bb6a5d50f

Daniel Stenberg
Daniel Stenberg
2025-11-12
SUCCESS Duration: 160s

Subject

tool_operate: use curlx_str_number intead of atoi

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_operate.c+4 -3
@@ -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