mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +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:
committed by
Siddhesh Poyarekar
parent
127c21c0e2
commit
a84dcb4bdf
@@ -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);
|
||||
|
Reference in New Issue
Block a user