diff options
author | KaoruToda <kunnpuu@gmail.com> | 2017-10-09 20:05:58 +0900 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-10-09 13:17:09 +0100 |
commit | 208fb891e36f16d20262710c70ef0ff3df0e885c (patch) | |
tree | 514e6161c7c21122fced736efaddd87f5b5e0538 /crypto/bn/bn_shift.c | |
parent | 2e8b5d75afaff7c9b75917b750f997dc82336fac (diff) |
Since return is inconsistent, I removed unnecessary parentheses and
unified them.
- return (0); -> return 0;
- return (1); -> return 1;
- return (-1); -> return -1;
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4500)
Diffstat (limited to 'crypto/bn/bn_shift.c')
-rw-r--r-- | crypto/bn/bn_shift.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/bn/bn_shift.c b/crypto/bn/bn_shift.c index 6a1eec80af..b3e2751eb4 100644 --- a/crypto/bn/bn_shift.c +++ b/crypto/bn/bn_shift.c @@ -40,7 +40,7 @@ int BN_lshift1(BIGNUM *r, const BIGNUM *a) r->top++; } bn_check_top(r); - return (1); + return 1; } int BN_rshift1(BIGNUM *r, const BIGNUM *a) @@ -53,7 +53,7 @@ int BN_rshift1(BIGNUM *r, const BIGNUM *a) if (BN_is_zero(a)) { BN_zero(r); - return (1); + return 1; } i = a->top; ap = a->d; @@ -77,7 +77,7 @@ int BN_rshift1(BIGNUM *r, const BIGNUM *a) if (!r->top) r->neg = 0; /* don't allow negative zero */ bn_check_top(r); - return (1); + return 1; } int BN_lshift(BIGNUM *r, const BIGNUM *a, int n) @@ -116,7 +116,7 @@ int BN_lshift(BIGNUM *r, const BIGNUM *a, int n) r->top = a->top + nw + 1; bn_correct_top(r); bn_check_top(r); - return (1); + return 1; } int BN_rshift(BIGNUM *r, const BIGNUM *a, int n) @@ -138,7 +138,7 @@ int BN_rshift(BIGNUM *r, const BIGNUM *a, int n) lb = BN_BITS2 - rb; if (nw >= a->top || a->top == 0) { BN_zero(r); - return (1); + return 1; } i = (BN_num_bits(a) - n + (BN_BITS2 - 1)) / BN_BITS2; if (r != a) { @@ -171,5 +171,5 @@ int BN_rshift(BIGNUM *r, const BIGNUM *a, int n) if (!r->top) r->neg = 0; /* don't allow negative zero */ bn_check_top(r); - return (1); + return 1; } |