added the endptr parameter to various string to number conversion functions

This commit is contained in:
2017-12-18 07:20:02 +00:00
parent 42ecad1e38
commit 0c8608f81b
12 changed files with 415 additions and 225 deletions

View File

@ -251,7 +251,8 @@ static int cgi_htrd_peek_script_output (qse_htrd_t* htrd, qse_htre_t* req)
qse_mchar_t* endptr;
/* TODO: check the syntax of status value??? if not numeric??? */
QSE_MBSTONUM (nstatus, req->attr.status, &endptr, 10);
/*QSE_MBSTONUM (nstatus, req->attr.status, &endptr, 10);*/
nstatus = qse_mbstoi (req->attr.status, 10, &endptr);
/*
Would it need this kind of extra work?

View File

@ -927,7 +927,7 @@ static void adjust_peer_name_and_port (task_proxy_t* proxy)
{
/* handle a port number after the colon sign */
*colon = QSE_MT('\0');
proxy->peer_port = qse_mbstoui (colon + 1, 10);
proxy->peer_port = qse_mbstoui (colon + 1, 10, QSE_NULL);
/* TODO: check if there is a garbage after the port number.
* check if the port number has overflown */
}