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/vswscanf.c | |
| parent | 22749a6e2adef96085ded69294e4988bed709546 (diff) | |
Notes
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 a5f0a89c8ef2..128e1a46f238 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); } |
