]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/i386/getgroups.c
[BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483,...
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / i386 / getgroups.c
index b7a0a4efd4f1ebc6c82f4fbb1a79bb72e02367f6..f69baf943bc1eb88c25258cbce193f5f38f2a6e5 100644 (file)
@@ -52,8 +52,6 @@ __getgroups (int n, gid_t *groups)
     }
   else
     {
-      int i, ngids;
-      __kernel_gid_t kernel_groups[n = MIN (n, __sysconf (_SC_NGROUPS_MAX))];
 # ifdef __NR_getgroups32
       if (__libc_missing_32bit_uids <= 0)
        {
@@ -69,6 +67,9 @@ __getgroups (int n, gid_t *groups)
        }
 # endif /* __NR_getgroups32 */
 
+      int i, ngids;
+      __kernel_gid_t kernel_groups[n = MIN (n, __sysconf (_SC_NGROUPS_MAX))];
+
       ngids = INLINE_SYSCALL (getgroups, 2, n, CHECK_N (kernel_groups, n));
       if (n != 0 && ngids > 0)
        for (i = 0; i < ngids; i++)