aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/bug4.c
diff options
context:
space:
mode:
authorFrederic Berat <fberat@redhat.com>2023-06-12 17:18:20 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-13 19:59:08 -0400
commita84dcb4bdfe5070f2327da693d8b025c89b4877a (patch)
treee551263f0622ab6dd69fe3ff1adf4aa0790320a9 /stdio-common/bug4.c
parent127c21c0e2f669454835f78fc03079866282c19b (diff)
downloadglibc-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/bug4.c')
-rw-r--r--stdio-common/bug4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/bug4.c b/stdio-common/bug4.c
index cf7fe11..4059ff7 100644
--- a/stdio-common/bug4.c
+++ b/stdio-common/bug4.c
@@ -2,6 +2,8 @@
#include <unistd.h>
#include <string.h>
+#include <support/xstdio.h>
+
int stdio_block_read = 1, stdio_block_write = 1;
int
@@ -30,7 +32,7 @@ main (int argc, char *argv[])
fseek (f, 8180L, 0);
fwrite ("Where does this text come from?", 1, 31, f);
fseek (f, 8180L, 0);
- fread (buffer, 1, 31, f);
+ xfread (buffer, 1, 31, f);
fwrite (buffer, 1, 31, stdout);
fclose (f);
remove (filename);