diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-06-01 12:40:05 -0400 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-01 12:40:05 -0400 |
commit | 026a84a54d3b6c23b999b793e2a6f8ecd211e3b8 (patch) | |
tree | a2d31c6c98b1de645aee08e9f8d907ec1961bd7d /support | |
parent | a8c888997845c5192e446176374c2e13bb3e2195 (diff) | |
download | glibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.tar.gz glibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.tar.xz glibc-026a84a54d3b6c23b999b793e2a6f8ecd211e3b8.zip |
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>
Diffstat (limited to 'support')
-rw-r--r-- | support/test-container.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/support/test-container.c b/support/test-container.c index e68f16eecf..d4ca41fe7c 100644 --- a/support/test-container.c +++ b/support/test-container.c @@ -1186,7 +1186,7 @@ main (int argc, char **argv) int status; /* Send the child's "outside" pid to it. */ - write (pipes[1], &child, sizeof(child)); + xwrite (pipes[1], &child, sizeof(child)); close (pipes[0]); close (pipes[1]); @@ -1255,7 +1255,7 @@ main (int argc, char **argv) sprintf (tmp, "%lld %lld 1\n", (long long) (be_su ? 0 : original_uid), (long long) original_uid); - write (UMAP, tmp, strlen (tmp)); + xwrite (UMAP, tmp, strlen (tmp)); xclose (UMAP); /* We must disable setgroups () before we can map our groups, else we @@ -1264,7 +1264,7 @@ main (int argc, char **argv) if (GMAP >= 0) { /* We support kernels old enough to not have this. */ - write (GMAP, "deny\n", 5); + xwrite (GMAP, "deny\n", 5); xclose (GMAP); } @@ -1276,7 +1276,7 @@ main (int argc, char **argv) sprintf (tmp, "%lld %lld 1\n", (long long) (be_su ? 0 : original_gid), (long long) original_gid); - write (GMAP, tmp, strlen (tmp)); + xwrite (GMAP, tmp, strlen (tmp)); xclose (GMAP); } |