From e9d4a7ee0b03130d5d198b4da7f1568daff5ab62 Mon Sep 17 00:00:00 2001 From: "nelsonb%netscape.com" Date: Wed, 27 Dec 2000 03:14:28 +0000 Subject: [PATCH] Attempt to clarify code to reduce confusion about side effect of MP_CHECKOK macro. git-svn-id: svn://10.0.0.236/trunk@84085 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/freebl/mpi/mpprime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mozilla/security/nss/lib/freebl/mpi/mpprime.c b/mozilla/security/nss/lib/freebl/mpi/mpprime.c index eb1d61c60e8..c7eaef08c0a 100644 --- a/mozilla/security/nss/lib/freebl/mpi/mpprime.c +++ b/mozilla/security/nss/lib/freebl/mpi/mpprime.c @@ -341,16 +341,15 @@ mp_err mpp_pprime(mp_int *a, int nt) for (jx = 1; jx < b; jx++) { /* z = z^2 (mod a) */ MP_CHECKOK( mp_sqrmod(&z, a, &z) ); + res = MP_NO; /* previous line set res to MP_YES */ if(mp_cmp_d(&z, 1) == 0) { - res = MP_NO; break; } if(mp_cmp(&z, &amo) == 0) { res = MP_YES; break; } - res = MP_NO; } /* end testing loop */ /* If the test passes, we will continue iterating, but a failed