aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorFrederic Berat <fberat@redhat.com>2023-06-12 17:18:21 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-13 19:59:08 -0400
commit7ba426a1115318fc11f4355f3161f35817a06ba4 (patch)
treeaf4aeb4348f06d4c8076475a892763612985ef59 /sysdeps
parenta84dcb4bdfe5070f2327da693d8b025c89b4877a (diff)
downloadglibc-7ba426a1115318fc11f4355f3161f35817a06ba4.zip
glibc-7ba426a1115318fc11f4355f3161f35817a06ba4.tar.gz
glibc-7ba426a1115318fc11f4355f3161f35817a06ba4.tar.bz2
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 <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/pthread/tst-cancel6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/pthread/tst-cancel6.c b/sysdeps/pthread/tst-cancel6.c
index 63e6d49..49b7399 100644
--- a/sysdeps/pthread/tst-cancel6.c
+++ b/sysdeps/pthread/tst-cancel6.c
@@ -20,12 +20,13 @@
#include <stdlib.h>
#include <unistd.h>
+#include <support/xstdio.h>
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;
}