]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: use X2NREALLOC in more places
authorEric Blake <ebb9@byu.net>
Thu, 8 Oct 2009 14:35:55 +0000 (08:35 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 9 Oct 2009 02:30:08 +0000 (20:30 -0600)
* src/chroot.c (set_additional_groups): Use X2NREALLOC rather than
x2nrealloc.
* src/factor.c (emit_factor): Likewise.
* src/setuidgid.c (main): Likewise.

src/chroot.c
src/factor.c
src/setuidgid.c

index 5e8cb9c6a745e0303294fb92d8cd871ceed51623..9269f1b0ea575ed70b7116e5e1dd5a46e5c09840 100644 (file)
@@ -91,7 +91,7 @@ set_additional_groups (char const *groups)
         }
 
       if (n_gids == n_gids_allocated)
-        gids = x2nrealloc (gids, &n_gids_allocated, sizeof *gids);
+        gids = X2NREALLOC (gids, &n_gids_allocated);
       gids[n_gids++] = value;
     }
 
index f48a720842b3778ea5ca4271fb1e26ddc86e7c53..38c9a115b69827f9cff2e13e2db8ea977b1163e1 100644 (file)
@@ -67,7 +67,7 @@ static void
 emit_factor (mpz_t n)
 {
   if (nfactors_found == nfactors_allocated)
-    factor = x2nrealloc (factor, &nfactors_allocated, sizeof *factor);
+    factor = X2NREALLOC (factor, &nfactors_allocated);
   mpz_init (factor[nfactors_found]);
   mpz_set (factor[nfactors_found], n);
   ++nfactors_found;
index 7176b1ae734ed7fc65e792ad7e80b0d1a13cc683..34be5155a30df98422296b835431139ed68a6996 100644 (file)
@@ -110,7 +110,7 @@ main (int argc, char **argv)
                       error (EXIT_FAILURE, 0, _("invalid group %s"),
                              quote (gr));
                     if (n_gids == n_gids_allocated)
-                      gids = x2nrealloc (gids, &n_gids_allocated, sizeof *gids);
+                      gids = X2NREALLOC (gids, &n_gids_allocated);
                     gids[n_gids++] = tmp_ul;
 
                     if (*ptr == '\0')