about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/getresgid.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/mach/hurd/getresgid.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/mach/hurd/getresgid.c')
-rw-r--r--sysdeps/mach/hurd/getresgid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/getresgid.c b/sysdeps/mach/hurd/getresgid.c
index 7847d213c4..a96aa49369 100644
--- a/sysdeps/mach/hurd/getresgid.c
+++ b/sysdeps/mach/hurd/getresgid.c
@@ -1,5 +1,5 @@
-/* getresgid -- fetch real group ID, effective group ID, and saved-set group ID
-   Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+/* getresgid -- fetch effective group ID, real group ID, and saved-set group ID
+   Copyright (C) 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,13 +22,13 @@
 #include <hurd.h>
 #include <hurd/id.h>
 
-/* Fetch the real group ID, effective group ID, and saved-set group ID,
+/* Fetch the effective group ID, real group ID, and saved-set group ID,
    of the calling process.  */
 int
-__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
+__getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
 {
   error_t err;
-  gid_t real, eff, saved;
+  gid_t eff, real, saved;
 
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_id.lock);
@@ -42,8 +42,8 @@ __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
       else
 	{
 	  real = _hurd_id.aux.gids[0];
+	  saved = _hurd_id.aux.ngids < 2 ? real :_hurd_id.aux.gids[1];
 	  eff = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
-	  saved = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
 	}
     }
 
@@ -53,8 +53,8 @@ __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
   if (err)
     return __hurd_fail (err);
 
-  *rgid = real;
   *egid = eff;
+  *rgid = real;
   *sgid = saved;
   return 0;
 }