aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-01 21:35:08 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-01 21:35:08 +0000
commitf7fa2b1951287b71711228e1fa6ddf97982f1efd (patch)
tree8f5bf800df3ce8bb11f53844db71dc78369f2471
parent927f0673b3bce7c209071bb5c4e3815f9b1ef0b0 (diff)
downloadglibc-f7fa2b1951287b71711228e1fa6ddf97982f1efd.tar
glibc-f7fa2b1951287b71711228e1fa6ddf97982f1efd.tar.gz
glibc-f7fa2b1951287b71711228e1fa6ddf97982f1efd.tar.bz2
glibc-f7fa2b1951287b71711228e1fa6ddf97982f1efd.zip
(__nscd_getgrouplist): Add assert.
-rw-r--r--nscd/nscd_initgroups.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c
index d6cb00000e..3e4d92609e 100644
--- a/nscd/nscd_initgroups.c
+++ b/nscd/nscd_initgroups.c
@@ -128,8 +128,12 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size,
}
}
else
- /* No group found yet. */
- retval = 0;
+ {
+ /* No group found yet. */
+ retval = 0;
+
+ assert (*size >= 1);
+ }
/* Check whether GROUP is part of the mix. If not, add it. */
if (retval >= 0)