simplify pthread_attr_t stack/guard size representation
[musl] / src / stdio / vfwscanf.c
index 44fac78..223aad4 100644 (file)
@@ -6,9 +6,6 @@
 #include <wctype.h>
 #include <limits.h>
 #include <string.h>
-#include <errno.h>
-#include <math.h>
-#include <float.h>
 
 #include "stdio_impl.h"
 #include "shgetc.h"
@@ -107,6 +104,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
 
        FLOCK(f);
 
+       fwide(f, 1);
+
        for (p=fmt; *p; p++) {
 
                alloc = 0;
@@ -143,6 +142,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
                }
 
                if (*p=='m') {
+                       wcs = 0;
+                       s = 0;
                        alloc = !!dest;
                        p++;
                } else {