1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

tests: replace write by xwrite

Using write without cheks leads to warn unused result when __wur is
enabled.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
Frédéric Bérat
2023-06-01 12:40:05 -04:00
committed by Siddhesh Poyarekar
parent a8c8889978
commit 026a84a54d
32 changed files with 84 additions and 39 deletions

View File

@@ -2,6 +2,8 @@
#include <stdio.h>
#include <support/xunistd.h>
static void do_prepare (void);
#define PREPARE(argc, argv) do_prepare ()
static int do_test (void);
@@ -20,7 +22,7 @@ do_prepare (void)
printf ("cannot create temporary file: %m\n");
exit (1);
}
write (fd, pattern, sizeof (pattern));
xwrite (fd, pattern, sizeof (pattern));
close (fd);
}