projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove invalid skip of locking in ungetwc
[musl]
/
src
/
stdio
/
vfwscanf.c
diff --git
a/src/stdio/vfwscanf.c
b/src/stdio/vfwscanf.c
index
760864f
..
ac5c2c2
100644
(file)
--- a/
src/stdio/vfwscanf.c
+++ b/
src/stdio/vfwscanf.c
@@
-6,9
+6,6
@@
#include <wctype.h>
#include <limits.h>
#include <string.h>
#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"
#include "stdio_impl.h"
#include "shgetc.h"
@@
-107,8
+104,12
@@
int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
FLOCK(f);
FLOCK(f);
+ f->mode |= f->mode+1;
+
for (p=fmt; *p; p++) {
for (p=fmt; *p; p++) {
+ alloc = 0;
+
if (iswspace(*p)) {
while (iswspace(p[1])) p++;
while (iswspace((c=getwc(f)))) pos++;
if (iswspace(*p)) {
while (iswspace(p[1])) p++;
while (iswspace((c=getwc(f)))) pos++;
@@
-141,6
+142,8
@@
int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap)
}
if (*p=='m') {
}
if (*p=='m') {
+ wcs = 0;
+ s = 0;
alloc = !!dest;
p++;
} else {
alloc = !!dest;
p++;
} else {