diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-11-04 11:05:55 +0000 | 
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-11-04 11:05:55 +0000 | 
| commit | a27a4b369016302f5feeeceed5a128aedb6bcb1f (patch) | |
| tree | de1efe529ace379f46b768f97f638aa004be19ea /lib/libc/stdio/fputwc.c | |
| parent | 92797e8470d5966562f258b4c73f28a784000e21 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/fputwc.c')
| -rw-r--r-- | lib/libc/stdio/fputwc.c | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/lib/libc/stdio/fputwc.c b/lib/libc/stdio/fputwc.c index ed1f11bbcccb..ba3c5bbfdf82 100644 --- a/lib/libc/stdio/fputwc.c +++ b/lib/libc/stdio/fputwc.c @@ -44,7 +44,6 @@ wint_t  __fputwc(wchar_t wc, FILE *fp)  {  	char buf[MB_LEN_MAX]; -	mbstate_t mbs;  	size_t i, len;  	if (MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX) { @@ -56,8 +55,7 @@ __fputwc(wchar_t wc, FILE *fp)  		*buf = (unsigned char)wc;  		len = 1;  	} else { -		memset(&mbs, 0, sizeof(mbs)); -		if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) { +		if ((len = wcrtomb(buf, wc, NULL)) == (size_t)-1) {  			fp->_flags |= __SERR;  			return (WEOF);  		} | 
