diff options
Diffstat (limited to 'stdio-common/bug26.c')
-rw-r--r-- | stdio-common/bug26.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stdio-common/bug26.c b/stdio-common/bug26.c index 74a00d0..5c8f678 100644 --- a/stdio-common/bug26.c +++ b/stdio-common/bug26.c @@ -18,6 +18,8 @@ #include <stdio.h> #include <string.h> +#include <support/xstdio.h> + int main (void) { @@ -27,11 +29,12 @@ main (void) double d; char s[] = "+.e"; - f = fmemopen (s, strlen (s), "r"); + f = xfmemopen (s, strlen (s), "r"); /* This should fail to parse a floating-point number, and leave 'e' in the input. */ lost |= (fscanf (f, "%lf", &d) != 0); c = fgetc (f); + xfclose (f); lost |= c != 'e'; puts (lost ? "Test FAILED!" : "Test succeeded."); return lost; |