diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-04-28 14:21:39 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-01 12:45:13 -0400 |
commit | 32043daaafcd59793b9addf7af1bcedb3b666f09 (patch) | |
tree | 2be44a97aaee5d057b630e885c384bde05b70ea5 /stdio-common | |
parent | 026a84a54d3b6c23b999b793e2a6f8ecd211e3b8 (diff) | |
download | glibc-32043daaafcd59793b9addf7af1bcedb3b666f09.zip glibc-32043daaafcd59793b9addf7af1bcedb3b666f09.tar.gz glibc-32043daaafcd59793b9addf7af1bcedb3b666f09.tar.bz2 |
tests: replace ftruncate by xftruncate
With fortification enabled, ftruncate calls return result needs to be
checked, has it gets the __wur macro enabled.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/tst-perror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c index 57835e0..b4ab583 100644 --- a/stdio-common/tst-perror.c +++ b/stdio-common/tst-perror.c @@ -9,6 +9,7 @@ #include <unistd.h> #include <wchar.h> +#include <support/xunistd.h> #define MB_EXP \ "null mode test 1: Invalid or incomplete multibyte or wide character\n" \ @@ -94,7 +95,7 @@ do_test (void) puts ("multibyte test succeeded"); lseek (fd, 0, SEEK_SET); - ftruncate (fd, 0); + xftruncate (fd, 0); if (dup2 (fd, 2) == -1) { |