From 30b7a66d4388a78e54da884bb4a880116064d730 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 14 Oct 2020 03:02:21 +0100 Subject: [PATCH] math/mp-nthrt.c: Delete redundant check for termination. This case is already handled above. --- math/mp-nthrt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/math/mp-nthrt.c b/math/mp-nthrt.c index a46590af..80185e0d 100644 --- a/math/mp-nthrt.c +++ b/math/mp-nthrt.c @@ -180,10 +180,9 @@ int mp_perfect_power_p(mp **x, mp **n, mp *a) t = mp_nthrt(t, a, p, &exactp); if (MP_EQ(t, MP_ONE)) break; - else if (!exactp) { - if (MP_EQ(t, MP_ONE)) break; + else if (!exactp) p = primeiter_next(&pi, p); - } else { + else { r = mp_mul(r, r, p); MP_DROP(a); a = t; t = MP_NEW; rc = 1; -- 2.11.0