changeset 4891:459ebb7c12d8

* getgroups.c (getgroups): xmalloc takes one argument, not two.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 03 Dec 2003 10:17:42 +0000
parents 5ec3ef4c5823
children 98f380335bce
files lib/ChangeLog lib/getgroups.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-03  Paul Eggert  <eggert@twinsun.com>
+
+	* getgroups.c (getgroups): xmalloc takes one argument, not two.
+	Bug reported by Alfred M. Szmidt.
+
 2003-11-29  Karl Berry  <karl@gnu.org>
 
 	* argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -48,7 +48,7 @@
       /* No need to worry about address arithmetic overflow here,
 	 since the ancient systems that we're running on have low
 	 limits on the number of secondary groups.  */
-      gbuf = xmalloc (gbuf, n * sizeof *gbuf);
+      gbuf = xmalloc (n * sizeof *gbuf);
       n_groups = getgroups (n, gbuf);
       if (n_groups < n)
 	break;