[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Thu May 13 06:17:46 UTC 2021
details: /var/hg/gmp/rev/6a36d658679f
changeset: 18215:6a36d658679f
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu May 13 08:16:23 2021 +0200
description:
mini-gmp/tests/t-reuse.c: Use numberof() to reduce the risk of typos.
details: /var/hg/gmp/rev/56bc2f1b420c
changeset: 18216:56bc2f1b420c
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Thu May 13 08:17:26 2021 +0200
description:
ChangeLog
diffstat:
mini-gmp/ChangeLog | 4 ++++
mini-gmp/tests/t-reuse.c | 12 ++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (68 lines):
diff -r 632506b00743 -r 56bc2f1b420c mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog Sat May 08 19:34:05 2021 +0200
+++ b/mini-gmp/ChangeLog Thu May 13 08:17:26 2021 +0200
@@ -1,3 +1,7 @@
+2021-05-13 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * tests/t-reuse.c: Use numberof() to reduce the risk of typos.
+
2021-04-16 Marco Bodrato <bodrato at mail.dm.unipi.it>
* mini-gmp.c (gmp_millerrabin): Don't check unlikely 0 or 1.
diff -r 632506b00743 -r 56bc2f1b420c mini-gmp/tests/t-reuse.c
--- a/mini-gmp/tests/t-reuse.c Sat May 08 19:34:05 2021 +0200
+++ b/mini-gmp/tests/t-reuse.c Thu May 13 08:17:26 2021 +0200
@@ -197,7 +197,7 @@
if ((bsi & 4) != 0)
mpz_neg (in3, in3);
- for (i = 0; i < sizeof (dss_funcs) / sizeof (dss_func); i++)
+ for (i = 0; i < numberof (dss_funcs); i++)
{
if (dss_funcs[i] == 0)
continue;
@@ -220,7 +220,7 @@
FAIL (dss, i, in1, in2, NULL);
}
- for (i = 0; i < sizeof (ddss_div_funcs) / sizeof (ddss_div_func); i++)
+ for (i = 0; i < numberof (ddss_div_funcs); i++)
{
if (ddss_div_funcs[i] == 0)
continue;
@@ -260,7 +260,7 @@
FAIL (ddss_div, i, in1, in2, NULL);
}
- for (i = 0; i < sizeof (ds_funcs) / sizeof (ds_func); i++)
+ for (i = 0; i < numberof (ds_funcs); i++)
{
if (ds_funcs[i] == 0)
continue;
@@ -280,7 +280,7 @@
in2i = mpz_get_ui (in2);
- for (i = 0; i < sizeof (dsi_funcs) / sizeof (dsi_func); i++)
+ for (i = 0; i < numberof (dsi_funcs); i++)
{
if (dsi_funcs[i] == 0)
continue;
@@ -308,7 +308,7 @@
if (in2i != 0) /* Don't divide by 0. */
{
- for (i = 0; i < sizeof (dsi_div_funcs) / sizeof (dsi_div_funcs); i++)
+ for (i = 0; i < numberof (dsi_div_funcs); i++)
{
r1 = (dsi_div_funcs[i]) (ref1, in1, in2i);
mpz_check_format (ref1);
@@ -320,7 +320,7 @@
FAIL (dsi_div, i, in1, in2, NULL);
}
- for (i = 0; i < sizeof (ddsi_div_funcs) / sizeof (ddsi_div_funcs); i++)
+ for (i = 0; i < numberof (ddsi_div_funcs); i++)
{
r1 = (ddsi_div_funcs[i]) (ref1, ref2, in1, in2i);
mpz_check_format (ref1);
More information about the gmp-commit
mailing list