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

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