We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d7ffd3 commit a9cdaa8Copy full SHA for a9cdaa8
demo/test.c
@@ -1573,15 +1573,13 @@ static int test_mp_log(void)
1573
1574
/* Random a, base */
1575
for (i = 1; i < 256; i++) {
1576
- DO(mp_rand(&a, i));
1577
- if (mp_cmp_d(&a,2u) == MP_LT) {
1578
- continue;
1579
- }
+ do {
+ DO(mp_rand(&a, i));
+ } while (mp_cmp_d(&a,2u) == MP_LT);
1580
for (j = 1; j < ((i/2)+1); j++) {
1581
- DO(mp_rand(&base, j));
1582
- if (mp_cmp_d(&base,2u) == MP_LT) {
1583
1584
+ DO(mp_rand(&base, j));
+ } while (mp_cmp_d(&base,2u) == MP_LT);
1585
DO(mp_log(&a, &base, &lb));
1586
DO(mp_expt_n(&base, lb, &bn));
1587
/* "bn" must be smaller than or equal to "a" at this point. */
0 commit comments