From: Daiki Ueno Date: Sat, 5 Aug 2017 07:43:43 +0000 (+0200) Subject: ecc-mul-test: Fix mpn_cmp calls X-Git-Tag: nettle_3.4rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e65d9fc9cfb69eab58170eb956eaa08b073d5978;p=thirdparty%2Fnettle.git ecc-mul-test: Fix mpn_cmp calls Signed-off-by: Daiki Ueno --- diff --git a/testsuite/ecc-mul-a-test.c b/testsuite/ecc-mul-a-test.c index b206b848..245016aa 100644 --- a/testsuite/ecc-mul-a-test.c +++ b/testsuite/ecc-mul-a-test.c @@ -26,7 +26,7 @@ test_main (void) ecc->mul (ecc, p, n, ecc->g, scratch); ecc->h_to_a (ecc, 0, p, p, scratch); - if (mpn_cmp (p, ecc->g, 2*size != 0)) + if (mpn_cmp (p, ecc->g, 2*size) != 0) die ("curve %d: ecc->mul with n = 1 failed.\n", ecc->p.bit_size); for (n[0] = 2; n[0] <= 4; n[0]++) diff --git a/testsuite/ecc-mul-g-test.c b/testsuite/ecc-mul-g-test.c index 1c4d0c05..27239484 100644 --- a/testsuite/ecc-mul-g-test.c +++ b/testsuite/ecc-mul-g-test.c @@ -25,7 +25,7 @@ test_main (void) ecc->mul_g (ecc, p, n, scratch); ecc->h_to_a (ecc, 0, p, p, scratch); - if (mpn_cmp (p, ecc->g, 2*size != 0)) + if (mpn_cmp (p, ecc->g, 2*size) != 0) { fprintf (stderr, "ecc->mul_g with n = 1 failed.\n"); abort ();