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
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user