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:
committed by
Siddhesh Poyarekar
parent
a8c8889978
commit
026a84a54d
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user