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

@ -342,7 +342,7 @@ static void read_proc_net_if_inet6 (qse_nwifcfg_t* cfg, struct ifreq* ifr)
if (count >= 6)
{
index = qse_mbsxtoi (tok[1].ptr, tok[1].len, 16);
index = qse_mbsxtoi (tok[1].ptr, tok[1].len, 16, QSE_NULL);
if (index == cfg->index)
{
int ti;
@ -356,7 +356,7 @@ static void read_proc_net_if_inet6 (qse_nwifcfg_t* cfg, struct ifreq* ifr)
cfg->addr.type = QSE_NWAD_IN6;
ti = qse_mbsxtoi (tok[2].ptr, tok[0].len, 16);
ti = qse_mbsxtoi (tok[2].ptr, tok[0].len, 16, QSE_NULL);
qse_prefixtoip6ad (ti, &cfg->mask.u.in6.addr);
cfg->mask.type = QSE_NWAD_IN6;

View File

@ -65,7 +65,8 @@ int qse_get_highest_fd (void)
if (de->d_name[0] == QSE_MT('.')) continue;
QSE_MBSTONUM (l, de->d_name, &endptr, 10);
/*QSE_MBSTONUM (l, de->d_name, &endptr, 10);*/
l = qse_mbstolong (de->d_name, 10, &endptr);
if (*endptr == QSE_MT('\0'))
{
fd = (int)l;
@ -137,7 +138,8 @@ int qse_close_open_fds_using_proc (int* excepts, qse_size_t count)
if (de->d_name[0] == QSE_MT('.')) continue;
QSE_MBSTONUM (l, de->d_name, &endptr, 10);
/*QSE_MBSTONUM (l, de->d_name, &endptr, 10);*/
l = qse_mbstolong (de->d_name, 10, &endptr);
if (*endptr == QSE_MT('\0'))
{
int fd = (int)l;