summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-07-29 06:08:31 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-07-29 06:08:31 +0000
commite214931fbf4f87aaf5589e3348ea36076106ce73 (patch)
tree2a3f5dca50ba88844f4b103a891afad72896ea95
parentb5bc6d4db0d4a428ce9fc6395ba1b12ec45cd95f (diff)
Notes
-rw-r--r--lib/libc/locale/mblen.c4
-rw-r--r--lib/libc/locale/mbtowc.c4
-rw-r--r--lib/libc/locale/wctomb.c4
3 files changed, 0 insertions, 12 deletions
diff --git a/lib/libc/locale/mblen.c b/lib/libc/locale/mblen.c
index 8486e7173cbf..65d0aa7c478f 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 994d243fb2c8..8ee280aa2b05 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 6616a661e891..d9c607e69760 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);
}