summaryrefslogtreecommitdiff
path: root/mpz/mfac_uiui.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2015-11-09 22:30:52 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2015-11-09 22:30:52 +0100
commit7acd63c08b3b969696681ee8125ea63e543998c8 (patch)
treefccdc23ceb50b4647ac4dd5848c9170972c3030d /mpz/mfac_uiui.c
parente97517c73c6a962a9d2cd519adcc639087cd1a75 (diff)
downloadgmp-7acd63c08b3b969696681ee8125ea63e543998c8.tar.gz
mpz: Lazy allocation.
Diffstat (limited to 'mpz/mfac_uiui.c')
-rw-r--r--mpz/mfac_uiui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/mfac_uiui.c b/mpz/mfac_uiui.c
index 3ea36bce9..a34727502 100644
--- a/mpz/mfac_uiui.c
+++ b/mpz/mfac_uiui.c
@@ -59,7 +59,7 @@ mpz_mfac_uiui (mpz_ptr x, unsigned long n, unsigned long m)
ASSERT (m != 0);
if ((n < 3) | (n - 3 < m - 1)) { /* (n < 3 || n - 1 <= m || m == 0) */
- PTR (x)[0] = n + (n == 0);
+ MPZ_NEWALLOC (x, 1)[0] = n + (n == 0);
SIZ (x) = 1;
} else { /* m < n - 1 < GMP_NUMB_MAX */
mp_limb_t g, sn;