aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/bug3.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/bug3.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/bug3.c')
-rw-r--r--stdio-common/bug3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/bug3.c b/stdio-common/bug3.c
index 62a6cab..deabd00 100644
--- a/stdio-common/bug3.c
+++ b/stdio-common/bug3.c
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <string.h>
+#include <support/xstdio.h>
+
int
main (void)
{
@@ -32,7 +34,7 @@ main (void)
char buf[25];
buf[0] = j;
- fread (buf + 1, 1, 23, f);
+ xfread (buf + 1, 1, 23, f);
buf[24] = '\0';
if (strcmp (buf, "Where does this text go?") != 0)
{