summaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/tst-sscanf.c5
-rw-r--r--stdio-common/vfscanf.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c
index 3bd7c35832..e710e190d7 100644
--- a/stdio-common/tst-sscanf.c
+++ b/stdio-common/tst-sscanf.c
@@ -78,7 +78,6 @@ struct int_test
{ "foo\t", "foo bar", -1 },
{ "foo\t", "foo %d", -1 },
{ "foo\t", "foo\t%d", -1 },
- { "foo \t %bar1", "foo%%bar%d", 0 },
{ "foo", "foo", 0 },
{ "foon", "foo bar", 0 },
{ "foon", "foo %d", 0 },
@@ -89,7 +88,9 @@ struct int_test
{ "foo bar", "foo %d", 0 },
{ "foo bar", "foon%d", 0 },
{ "foo ", "foo %n", 0 },
- { "foo%bar1", "foo%%bar%d", 1 }
+ { "foo%bar1", "foo%%bar%d", 1 },
+ /* Some OSes skip whitespace here while others don't. */
+ { "foo \t %bar1", "foo%%bar%d", 1 }
};
int
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 551849b115..63e7bd8815 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -543,8 +543,7 @@ _IO_vfscanf (s, format, argptr, errp)
/* Find the conversion specifier. */
fc = *f++;
if (skip_space || (fc != L_('[') && fc != L_('c')
- && fc != L_('C') && fc != L_('n')
- && fc != L_('%')))
+ && fc != L_('C') && fc != L_('n')))
{
/* Eat whitespace. */
int save_errno = errno;