diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-11-05 08:20:45 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-11-05 08:20:45 +0000 |
| commit | 2a49d3767f9fcadc25d13e9eddd686781bc15066 (patch) | |
| tree | c35ab994daf990dee6de564c4d51c99e38cf895a /lib/libc/stdio/vswprintf.c | |
| parent | 22749a6e2adef96085ded69294e4988bed709546 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/vswprintf.c')
| -rw-r--r-- | lib/libc/stdio/vswprintf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libc/stdio/vswprintf.c b/lib/libc/stdio/vswprintf.c index 44e7fc922477..a9fdaf3e1801 100644 --- a/lib/libc/stdio/vswprintf.c +++ b/lib/libc/stdio/vswprintf.c @@ -45,7 +45,6 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, { FILE f; struct __sFILEX ext; - mbstate_t mbs; char *mbp; int ret, sverrno; @@ -73,12 +72,11 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, } *f._p = '\0'; mbp = f._bf._base; - memset(&mbs, 0, sizeof(mbs)); /* * XXX Undo the conversion from wide characters to multibyte that * fputwc() did in __vfwprintf(). */ - if (mbsrtowcs(s, (const char **)&mbp, n, &mbs) == (size_t)-1) { + if (mbsrtowcs(s, (const char **)&mbp, n, NULL) == (size_t)-1) { free(f._bf._base); errno = EILSEQ; return (-1); |
