From: Niels Möller Date: Mon, 15 Nov 2021 18:38:11 +0000 (+0100) Subject: Reduce allocation in sqrt tests X-Git-Tag: nettle_3.8_release_20220602~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f73094352a4da505988d8846a7ece5c15d4612d;p=thirdparty%2Fnettle.git Reduce allocation in sqrt tests --- diff --git a/testsuite/ecc-sqrt-test.c b/testsuite/ecc-sqrt-test.c index 096cbafc..7984ed81 100644 --- a/testsuite/ecc-sqrt-test.c +++ b/testsuite/ecc-sqrt-test.c @@ -84,7 +84,7 @@ test_sqrt (gmp_randstate_t rands, const struct ecc_modulo *m, int use_redc) mpz_roinit_n (p, m->m, m->size); up = xalloc_limbs (m->size); - rp = xalloc_limbs (2*m->size); + rp = xalloc_limbs (m->size); scratch = xalloc_limbs (m->sqrt_itch); /* Check behaviour for zero input */ @@ -192,7 +192,7 @@ test_sqrt_ratio (gmp_randstate_t rands, const struct ecc_modulo *m) up = xalloc_limbs (m->size); vp = xalloc_limbs (m->size); - rp = xalloc_limbs (2*m->size); + rp = xalloc_limbs (m->size); scratch = xalloc_limbs (m->sqrt_ratio_itch); /* Check behaviour for zero input */