diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-09-03 14:33:58 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-09-03 14:33:58 +0000 |
commit | ee5040cd9d4d799667f7f1e1a1203df5b58e4e6c (patch) | |
tree | 6b14e79ee0910febe6fedb0090ae974cc033d586 /libc/hesiod/nss_hesiod | |
parent | 5ae64e3ae4a65a25176fe6b5d34946f49fd9d910 (diff) | |
download | eglibc2-ee5040cd9d4d799667f7f1e1a1203df5b58e4e6c.tar.gz |
Merge changes between r8878 and r8915 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@8916 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/hesiod/nss_hesiod')
-rw-r--r-- | libc/hesiod/nss_hesiod/hesiod-grp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/hesiod/nss_hesiod/hesiod-grp.c b/libc/hesiod/nss_hesiod/hesiod-grp.c index 50c53f789..f0c8c31e0 100644 --- a/libc/hesiod/nss_hesiod/hesiod-grp.c +++ b/libc/hesiod/nss_hesiod/hesiod-grp.c @@ -139,21 +139,19 @@ internal_gid_from_group (void *context, const char *groupname, gid_t *group) { char *p = *grp_res; + /* Skip to third field. */ while (*p != '\0' && *p != ':') ++p; - while (*p != '\0' && *p == ':') + if (*p != '\0') ++p; while (*p != '\0' && *p != ':') ++p; - while (*p != '\0' && *p == ':') - ++p; - if (*p == ':') + if (*p != '\0') { char *endp; char *q = ++p; long int val; - q = p; while (*q != '\0' && *q != ':') ++q; |