1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Remove useless checks for characters longer than INT_MAX bytes.

This commit is contained in:
Tim J. Robbins 2004-07-29 06:08:31 +00:00
parent b5bc6d4db0
commit e214931fbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132819
3 changed files with 0 additions and 12 deletions

View File

@ -48,9 +48,5 @@ mblen(const char *s, size_t n)
rval = __mbrtowc(NULL, s, n, &mbs);
if (rval == (size_t)-1 || rval == (size_t)-2)
return (-1);
if (rval > INT_MAX) {
errno = ERANGE;
return (-1);
}
return ((int)rval);
}

View File

@ -49,9 +49,5 @@ mbtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n)
rval = __mbrtowc(pwc, s, n, &mbs);
if (rval == (size_t)-1 || rval == (size_t)-2)
return (-1);
if (rval > INT_MAX) {
errno = ERANGE;
return (-1);
}
return ((int)rval);
}

View File

@ -48,9 +48,5 @@ wctomb(char *s, wchar_t wchar)
}
if ((rval = __wcrtomb(s, wchar, &mbs)) == (size_t)-1)
return (-1);
if (rval > INT_MAX) {
errno = ERANGE;
return (-1);
}
return ((int)rval);
}