summaryrefslogtreecommitdiff
path: root/src/group-list.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-01-28 00:08:32 +0100
committerJim Meyering <meyering@redhat.com>2008-02-14 11:31:57 +0100
commitcc8b73b1d9cb63c89a76db8ece8a699fb98fff1a (patch)
tree4dd2caba8f28bf2016bcd662654e90ae44240ee5 /src/group-list.c
parent167b8025aca487de001da2448c1aebc2747bc1d3 (diff)
downloadcoreutils-cc8b73b1d9cb63c89a76db8ece8a699fb98fff1a.tar.xz
groups: don't test printf and putchar calls for failure
They are unnecessary, since we use gnulib's closeout module. * src/group-list.c (print_group): Remove explicit error tests. * src/groups.c (main): Likewise. (write_error): Remove function.
Diffstat (limited to 'src/group-list.c')
-rw-r--r--src/group-list.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/group-list.c b/src/group-list.c
index e788f8e87..ace4908b1 100644
--- a/src/group-list.c
+++ b/src/group-list.c
@@ -109,21 +109,9 @@ print_group (gid_t gid, bool use_name)
}
if (grp == NULL)
- {
- if (printf ("%lu", (unsigned long int) gid) < 0)
- {
- error (0, errno, _("write error"));
- ok = false;
- }
- }
+ printf ("%lu", (unsigned long int) gid);
else
- {
- if (printf ("%s", grp->gr_name) < 0)
- {
- error (0, errno, _("write error"));
- ok = false;
- }
- }
+ printf ("%s", grp->gr_name);
return ok;
}