summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_div.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r--crypto/bn/bn_div.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c
index baff07040a..defcf90c82 100644
--- a/crypto/bn/bn_div.c
+++ b/crypto/bn/bn_div.c
@@ -216,10 +216,10 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
t1=((BN_ULLONG)n0<<BN_BITS2)|n1;
for (;;)
{
- t2=(BN_ULLONG)d1*q;
rem=t1-(BN_ULLONG)q*d0;
- if ((rem>>BN_BITS2) ||
- (t2 <= ((BN_ULLONG)(rem<<BN_BITS2)+wnump[-2])))
+ t2=(BN_ULLONG)d1*q;
+ if ((rem>>BN_BITS2) ||
+ (t2 <= ((rem<<BN_BITS2)|wnump[-2])))
break;
q--;
}