mirror of
https://github.com/curl/curl.git
synced 2026-07-30 11:08:03 +03:00
atoi: remove atoi usage
This commit is contained in:
parent
cbe67a1b71
commit
5db0a412ff
12 changed files with 36 additions and 22 deletions
|
|
@ -531,8 +531,8 @@ static int ProcessRequest(struct httprequest *req)
|
|||
/* if the host name starts with test, the port number used in the
|
||||
CONNECT line will be used as test number! */
|
||||
char *portp = strchr(doc, ':');
|
||||
if(portp)
|
||||
req->testno = atoi(portp+1);
|
||||
if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
|
||||
req->testno = strtol(portp+1, NULL, 10);
|
||||
else
|
||||
req->testno = DOCNUMBER_CONNECT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -467,8 +467,8 @@ static int ProcessRequest(struct httprequest *req)
|
|||
/* if the host name starts with test, the port number used in the
|
||||
CONNECT line will be used as test number! */
|
||||
char *portp = strchr(doc, ':');
|
||||
if(portp)
|
||||
req->testno = atoi(portp+1);
|
||||
if(portp && (*(portp+1) != '\0') && ISDIGIT(*(portp+1)))
|
||||
req->testno = strtol(portp+1, NULL, 10);
|
||||
else
|
||||
req->testno = DOCNUMBER_CONNECT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue