diff options
Diffstat (limited to 'lib/libc/stdio/fgetwc.c')
| -rw-r--r-- | lib/libc/stdio/fgetwc.c | 13 | 
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/libc/stdio/fgetwc.c b/lib/libc/stdio/fgetwc.c index 52bc988f7dc7..cf649fd841fe 100644 --- a/lib/libc/stdio/fgetwc.c +++ b/lib/libc/stdio/fgetwc.c @@ -79,18 +79,9 @@ __fgetwc_mbs(FILE *fp, mbstate_t *mbs, int *nread, locale_t locale)  	size_t nconv;  	struct xlocale_ctype *l = XLOCALE_CTYPE(locale); -	if (fp->_r <= 0 && __srefill(fp)) { -		*nread = 0; -		return (WEOF); -	} -	if (MB_CUR_MAX == 1) { -		/* Fast path for single-byte encodings. */ -		wc = *fp->_p++; -		fp->_r--; -		*nread = 1; -		return (wc); -	}  	*nread = 0; +	if (fp->_r <= 0 && __srefill(fp)) +		return (WEOF);  	do {  		nconv = l->__mbrtowc(&wc, fp->_p, fp->_r, mbs);  		if (nconv == (size_t)-1)  | 
