From 7ba426a1115318fc11f4355f3161f35817a06ba4 Mon Sep 17 00:00:00 2001 From: Frederic Berat Date: Mon, 12 Jun 2023 17:18:21 +0200 Subject: tests: replace fgets by xfgets With fortification enabled, fgets calls return result needs to be checked, has it gets the __wur macro enabled. Reviewed-by: Siddhesh Poyarekar --- sysdeps/pthread/tst-cancel6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/pthread/tst-cancel6.c b/sysdeps/pthread/tst-cancel6.c index 63e6d49707..49b7399353 100644 --- a/sysdeps/pthread/tst-cancel6.c +++ b/sysdeps/pthread/tst-cancel6.c @@ -20,12 +20,13 @@ #include #include +#include static void * tf (void *arg) { char buf[100]; - fgets (buf, sizeof (buf), arg); + xfgets (buf, sizeof (buf), arg); /* This call should never return. */ return NULL; } -- cgit 1.4.1