diff options
author | Frederic Berat <fberat@redhat.com> | 2023-06-12 17:18:20 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-13 19:59:08 -0400 |
commit | a84dcb4bdfe5070f2327da693d8b025c89b4877a (patch) | |
tree | e551263f0622ab6dd69fe3ff1adf4aa0790320a9 /stdio-common/tst-fmemopen3.c | |
parent | 127c21c0e2f669454835f78fc03079866282c19b (diff) | |
download | glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.zip glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.gz glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.bz2 |
tests: replace fread by xfread
With fortification enabled, fread calls return result needs to be checked,
has it gets the __wur macro enabled.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdio-common/tst-fmemopen3.c')
-rw-r--r-- | stdio-common/tst-fmemopen3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/tst-fmemopen3.c b/stdio-common/tst-fmemopen3.c index bef87b7..1627f17 100644 --- a/stdio-common/tst-fmemopen3.c +++ b/stdio-common/tst-fmemopen3.c @@ -21,6 +21,8 @@ #include <string.h> #include <sys/types.h> +#include <support/xstdio.h> + static void print_buffer (const char *s, size_t n) { @@ -153,7 +155,7 @@ do_test_read_seek_neg (const char *mode, const char *expected) FILE *fp = fmemopen (buf, sizeof (buf), mode); fseek (fp, offset, SEEK_END); - fread (tmp, tmps, 1, fp); + xfread (tmp, tmps, 1, fp); if (memcmp (tmp, expected, tmps) != 0) { |