1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

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>
This commit is contained in:
Frederic Berat
2023-06-12 17:18:20 +02:00
committed by Siddhesh Poyarekar
parent 127c21c0e2
commit a84dcb4bdf
9 changed files with 65 additions and 12 deletions

View File

@@ -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)
{