]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
ecc-mul-test: Fix mpn_cmp calls
authorDaiki Ueno <dueno@redhat.com>
Sat, 5 Aug 2017 07:43:43 +0000 (09:43 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 9 Sep 2017 19:21:47 +0000 (21:21 +0200)
Signed-off-by: Daiki Ueno <dueno@redhat.com>
testsuite/ecc-mul-a-test.c
testsuite/ecc-mul-g-test.c

index b206b8484e0a34c9ee5672d415c7c957ea161c35..245016aafc78085f99a2451abfeba5bcddac2023 100644 (file)
@@ -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]++)
index 1c4d0c05af0d66e1207af7012b3b4f7375cd0fdb..272394847f3a913705142dee82bc3a47b17505ed 100644 (file)
@@ -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 ();