diff options
Diffstat (limited to 'lib/libc/locale/wcsnrtombs.c')
-rw-r--r-- | lib/libc/locale/wcsnrtombs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/locale/wcsnrtombs.c b/lib/libc/locale/wcsnrtombs.c index 68d6b5c..e899698 100644 --- a/lib/libc/locale/wcsnrtombs.c +++ b/lib/libc/locale/wcsnrtombs.c @@ -73,7 +73,7 @@ __wcsnrtombs_std(char * __restrict dst, const wchar_t ** __restrict src, while (len > 0 && nwc-- > 0) { if (len > (size_t)MB_CUR_MAX) { /* Enough space to translate in-place. */ - if ((nb = (int)__wcrtomb(dst, *s, ps)) < 0) { + if ((nb = __wcrtomb(dst, *s, ps)) == (size_t)-1) { *src = s; return ((size_t)-1); } @@ -86,7 +86,7 @@ __wcsnrtombs_std(char * __restrict dst, const wchar_t ** __restrict src, * character is too long for the buffer. */ mbsbak = *ps; - if ((nb = (int)__wcrtomb(buf, *s, ps)) < 0) { + if ((nb = __wcrtomb(buf, *s, ps)) == (size_t)-1) { *src = s; return ((size_t)-1); } |