summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/vfscanf.c')
-rw-r--r--lib/libc/stdio/vfscanf.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index b6f7571..41bb822 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -140,7 +140,6 @@ __svfscanf(FILE *fp, const char *fmt0, va_list ap)
char buf[BUF]; /* buffer for numeric and mb conversions */
wchar_t *wcp; /* handy wide character pointer */
wchar_t *wcp0; /* saves original value of wcp */
- mbstate_t mbs; /* multibyte conversion state */
size_t nconv; /* length of multibyte sequence converted */
/* `basefix' is used to avoid `if' tests in the integer scanner */
@@ -367,8 +366,7 @@ literal:
buf[n++] = *fp->_p;
fp->_p++;
fp->_r--;
- memset(&mbs, 0, sizeof(mbs));
- nconv = mbrtowc(wcp, buf, n, &mbs);
+ nconv = mbrtowc(wcp, buf, n, NULL);
if (nconv == (size_t)-1) {
fp->_flags |= __SERR;
goto input_failure;
@@ -447,8 +445,7 @@ literal:
buf[n++] = *fp->_p;
fp->_p++;
fp->_r--;
- memset(&mbs, 0, sizeof(mbs));
- nconv = mbrtowc(wcp, buf, n, &mbs);
+ nconv = mbrtowc(wcp, buf, n, NULL);
if (nconv == (size_t)-1) {
fp->_flags |= __SERR;
goto input_failure;
@@ -548,8 +545,7 @@ literal:
buf[n++] = *fp->_p;
fp->_p++;
fp->_r--;
- memset(&mbs, 0, sizeof(mbs));
- nconv = mbrtowc(wcp, buf, n, &mbs);
+ nconv = mbrtowc(wcp, buf, n, NULL);
if (nconv == (size_t)-1) {
fp->_flags |= __SERR;
goto input_failure;
OpenPOWER on IntegriCloud