guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-94-g3d2b26


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-94-g3d2b267
Date: Sat, 16 Feb 2013 17:42:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=3d2b2676e3fc0a5b243b8a4188d07bba1b4b40a4

The branch, stable-2.0 has been updated
       via  3d2b2676e3fc0a5b243b8a4188d07bba1b4b40a4 (commit)
      from  91c763ee3f195dc0e26339608da01250d6924009 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3d2b2676e3fc0a5b243b8a4188d07bba1b4b40a4
Author: Ludovic Courtès <address@hidden>
Date:   Sat Feb 16 18:40:39 2013 +0100

    Fix `getgroups' for when zero supplementary group IDs exist.
    
    * libguile/posix.c (scm_getgroups): Return the empty vector when NGROUPS
      is zero.  Reported by Mike Gran <address@hidden>.

-----------------------------------------------------------------------

Summary of changes:
 libguile/posix.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libguile/posix.c b/libguile/posix.c
index 324f21b..39661a0 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -265,8 +265,10 @@ SCM_DEFINE (scm_getgroups, "getgroups", 0, 0, 0,
   GETGROUPS_T *groups;
 
   ngroups = getgroups (0, NULL);
-  if (ngroups <= 0)
+  if (ngroups < 0)
     SCM_SYSERROR;
+  else if (ngroups == 0)
+    return scm_c_make_vector (0, SCM_BOOL_F);
 
   size = ngroups * sizeof (GETGROUPS_T);
   groups = scm_malloc (size);


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]