From 026a84a54d3b6c23b999b793e2a6f8ecd211e3b8 Mon Sep 17 00:00:00 2001 From: Frédéric Bérat Date: Thu, 1 Jun 2023 12:40:05 -0400 Subject: tests: replace write by xwrite Using write without cheks leads to warn unused result when __wur is enabled. Reviewed-by: Siddhesh Poyarekar --- support/test-container.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'support') 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); } -- cgit 1.4.1