diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-29 06:08:31 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-29 06:08:31 +0000 |
commit | 922ba3746b14d6163ff54ba461ff3ef6a9a1fcc7 (patch) | |
tree | 2a3f5dca50ba88844f4b103a891afad72896ea95 /lib/libc | |
parent | 0a36b82adc4660322dc9d1423fa8966917e60ed2 (diff) | |
download | FreeBSD-src-922ba3746b14d6163ff54ba461ff3ef6a9a1fcc7.zip FreeBSD-src-922ba3746b14d6163ff54ba461ff3ef6a9a1fcc7.tar.gz |
Remove useless checks for characters longer than INT_MAX bytes.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/locale/mblen.c | 4 | ||||
-rw-r--r-- | lib/libc/locale/mbtowc.c | 4 | ||||
-rw-r--r-- | lib/libc/locale/wctomb.c | 4 |
3 files changed, 0 insertions, 12 deletions
diff --git a/lib/libc/locale/mblen.c b/lib/libc/locale/mblen.c index 8486e71..65d0aa7 100644 --- a/lib/libc/locale/mblen.c +++ b/lib/libc/locale/mblen.c @@ -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); } diff --git a/lib/libc/locale/mbtowc.c b/lib/libc/locale/mbtowc.c index 994d243..8ee280a 100644 --- a/lib/libc/locale/mbtowc.c +++ b/lib/libc/locale/mbtowc.c @@ -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); } diff --git a/lib/libc/locale/wctomb.c b/lib/libc/locale/wctomb.c index 6616a66..d9c607e 100644 --- a/lib/libc/locale/wctomb.c +++ b/lib/libc/locale/wctomb.c @@ -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); } |