diff options
author | Geoff Thorpe <geoff@openssl.org> | 2004-02-22 19:30:41 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2004-02-22 19:30:41 +0000 |
commit | 1b06804491c8cd5a7bb1e4911578351bbe91a2af (patch) | |
tree | 3580439bc5b2b30a32fc5c9549d7612e089f9b7a | |
parent | dc90f64d563f2c9709749d0731d6b26c6bce5325 (diff) | |
download | openssl-new-1b06804491c8cd5a7bb1e4911578351bbe91a2af.tar.gz |
When adding positive elements, we can use BN_uadd() instead of BN_add().
Submitted by: Nils Larsch
Reviewed by: Geoff Thorpe
-rw-r--r-- | crypto/bn/bn_mod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c index 61b7255098..77d6ddb91a 100644 --- a/crypto/bn/bn_mod.c +++ b/crypto/bn/bn_mod.c @@ -149,7 +149,7 @@ int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_ * and less than m */ int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m) { - if (!BN_add(r, a, b)) return 0; + if (!BN_uadd(r, a, b)) return 0; if (BN_ucmp(r, m) >= 0) return BN_usub(r, r, m); return 1; |