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:
committed by
Siddhesh Poyarekar
parent
127c21c0e2
commit
a84dcb4bdf
@@ -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);
|
||||
|
Reference in New Issue
Block a user