about summary refs log tree commit diff
path: root/stdio-common/tst-cookie.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/tst-cookie.c
parent127c21c0e2f669454835f78fc03079866282c19b (diff)
downloadglibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.gz
glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.tar.xz
glibc-a84dcb4bdfe5070f2327da693d8b025c89b4877a.zip
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-cookie.c')
-rw-r--r--stdio-common/tst-cookie.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stdio-common/tst-cookie.c b/stdio-common/tst-cookie.c
index 030e684562..90ebc8e58c 100644
--- a/stdio-common/tst-cookie.c
+++ b/stdio-common/tst-cookie.c
@@ -5,6 +5,8 @@
 
 #include <stdio.h>
 
+#include <support/xstdio.h>
+
 
 #define THE_COOKIE ((void *) 0xdeadbeeful)
 
@@ -77,7 +79,8 @@ do_test (void)
 
   f = fopencookie (THE_COOKIE, "r+", fcts);
 
-  fread (buf, 1, 1, f);
+  xfread (buf, 1, 1, f);
+
   fwrite (buf, 1, 1, f);
   fseek (f, 0, SEEK_CUR);
   fclose (f);