X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fvfscanf.c;h=fe071e95cfbb6b81a3e43a7ec3fa65c5ce1ca590;hb=5afc74fbaa2371f30df0dc9fb7bc3afe6bd96137;hp=64fa97543142e16012f34c632ffbca209cf05cf6;hpb=cb81b6947c0277a6a27ddc699d716e9cf2b524aa;p=musl diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index 64fa9754..fe071e95 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -1,4 +1,3 @@ -#include #include #include #include @@ -9,6 +8,7 @@ #include #include #include +#include #include "stdio_impl.h" #include "shgetc.h" @@ -71,7 +71,7 @@ static int readwc(int c, wchar_t **wcs, mbstate_t *st) return 0; } -int vfscanf(FILE *f, const char *fmt, va_list ap) +int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap) { int width; int size; @@ -103,6 +103,7 @@ int vfscanf(FILE *f, const char *fmt, va_list ap) } if (*p != '%' || p[1] == '%') { p += *p=='%'; + shlim(f, 0); c = shgetc(f); if (c!=*p) { shunget(f);