summaryrefslogtreecommitdiff
path: root/lib/userspec.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-03-14 18:47:31 +0000
committerJim Meyering <jim@meyering.net>1994-03-14 18:47:31 +0000
commit3e13a5f6dcdad312efed1982b22d316096dd81d8 (patch)
tree4c4f10890a1ac023a7633f9d754bc1083b8442af /lib/userspec.c
parentbd25077b1671eeb2d7cec5b37fa6b25e3f743bd1 (diff)
downloadcoreutils-3e13a5f6dcdad312efed1982b22d316096dd81d8.tar.xz
.
Diffstat (limited to 'lib/userspec.c')
-rw-r--r--lib/userspec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/userspec.c b/lib/userspec.c
index 34b1d3211..6de8b824d 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -44,8 +44,6 @@
#ifdef STDC_HEADERS
#include <stdlib.h>
-#else
-char *malloc ();
#endif
#ifdef HAVE_UNISTD_H
@@ -189,7 +187,7 @@ parse_user_spec (spec_arg, uid, gid, username, groupname)
}
}
- if (g != NULL)
+ if (g != NULL && error_msg == NULL)
{
/* Explicit group. */
grp = getgrnam (g);
@@ -208,7 +206,7 @@ parse_user_spec (spec_arg, uid, gid, username, groupname)
{
*groupname = strdup (g);
if (*groupname == NULL)
- return tired;
+ error_msg = tired;
}
}