diff options
Diffstat (limited to 'stdio-common/bug19.c')
-rw-r--r-- | stdio-common/bug19.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/stdio-common/bug19.c b/stdio-common/bug19.c index e083304bda..9a3deac3fc 100644 --- a/stdio-common/bug19.c +++ b/stdio-common/bug19.c @@ -29,12 +29,17 @@ do_test (void) printf("checking sscanf\n"); int i, j, n; + int result = 0; i = j = n = 0; - FSCANF (fp, L(" %i - %i %n"), &i, &j, &n); + if (FSCANF (fp, L(" %i - %i %n"), &i, &j, &n) < 2) + { + printf ("FSCANF couldn't read all parameters %d\n", errno); + result = 1; + } + printf ("found %i-%i (length=%i)\n", i, j, n); - int result = 0; if (i != 7) { printf ("i is %d, expected 7\n", i); |