From: Eric Blake Date: Thu, 8 Oct 2009 14:35:55 +0000 (-0600) Subject: maint: use X2NREALLOC in more places X-Git-Tag: v8.1~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c039c9644983bfdcee7a85ef3166a53a878721eb;p=thirdparty%2Fcoreutils.git maint: use X2NREALLOC in more places * src/chroot.c (set_additional_groups): Use X2NREALLOC rather than x2nrealloc. * src/factor.c (emit_factor): Likewise. * src/setuidgid.c (main): Likewise. --- diff --git a/src/chroot.c b/src/chroot.c index 5e8cb9c6a7..9269f1b0ea 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -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; } diff --git a/src/factor.c b/src/factor.c index f48a720842..38c9a115b6 100644 --- a/src/factor.c +++ b/src/factor.c @@ -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; diff --git a/src/setuidgid.c b/src/setuidgid.c index 7176b1ae73..34be5155a3 100644 --- a/src/setuidgid.c +++ b/src/setuidgid.c @@ -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')