diff options
author | Rich Salz <rsalz@akamai.com> | 2019-09-16 15:28:57 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-09 21:32:15 +0200 |
commit | 12a765a5235f181c2f4992b615eb5f892c368e88 (patch) | |
tree | 67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/bn | |
parent | 3a4e43de473ee80347036d78163889b6b1221210 (diff) |
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn_gf2m.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c index bfece40c59..7a56745fe2 100644 --- a/crypto/bn/bn_gf2m.c +++ b/crypto/bn/bn_gf2m.c @@ -297,7 +297,7 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]) bn_check_top(a); - if (!p[0]) { + if (p[0] == 0) { /* reduction mod 1 => return 0 */ BN_zero(r); return 1; @@ -929,7 +929,7 @@ int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const int p[], bn_check_top(a); - if (!p[0]) { + if (p[0] == 0) { /* reduction mod 1 => return 0 */ BN_zero(r); return 1; @@ -988,7 +988,7 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const int p[], bn_check_top(a_); - if (!p[0]) { + if (p[0] == 0) { /* reduction mod 1 => return 0 */ BN_zero(r); return 1; |