math/mp-nthrt.c: Delete redundant check for termination.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 14 Oct 2020 02:02:21 +0000 (03:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 14 Oct 2020 02:02:21 +0000 (03:02 +0100)
This case is already handled above.

math/mp-nthrt.c

index a46590a..80185e0 100644 (file)
@@ -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;