diff options
Diffstat (limited to 'lib/libc/stdio/vswscanf.c')
-rw-r--r-- | lib/libc/stdio/vswscanf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libc/stdio/vswscanf.c b/lib/libc/stdio/vswscanf.c index a5f0a89..128e1a4 100644 --- a/lib/libc/stdio/vswscanf.c +++ b/lib/libc/stdio/vswscanf.c @@ -65,7 +65,6 @@ vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, va_list ap) { FILE f; - mbstate_t mbs; struct __sFILEX ext; char *mbstr; size_t mlen; @@ -77,8 +76,7 @@ vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, */ if ((mbstr = malloc(wcslen(str) * MB_CUR_MAX + 1)) == NULL) return (EOF); - memset(&mbs, 0, sizeof(mbs)); - if ((mlen = wcsrtombs(mbstr, &str, SIZE_T_MAX, &mbs)) == (size_t)-1) { + if ((mlen = wcsrtombs(mbstr, &str, SIZE_T_MAX, NULL)) == (size_t)-1) { free(mbstr); return (EOF); } |