From 26a7d938c9bf932a55cb5e4e02abb48fe395c5cd Mon Sep 17 00:00:00 2001 From: KaoruToda Date: Tue, 17 Oct 2017 23:04:09 +0900 Subject: Remove parentheses of return. Since return is inconsistent, I removed unnecessary parentheses and unified them. Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4541) --- crypto/dh/dh_ameth.c | 4 ++-- crypto/dh/dh_check.c | 6 +++--- crypto/dh/dh_key.c | 4 ++-- crypto/dh/dh_lib.c | 6 +++--- crypto/dh/dh_prn.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crypto/dh') diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index abf68aa25d..e504690fa3 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -326,7 +326,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, int ptype) goto err; } if (BIO_write(bp, "\n", 1) <= 0) - return (0); + return 0; } if (x->counter && !ASN1_bn_print(bp, "counter:", x->counter, NULL, indent)) goto err; @@ -346,7 +346,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent, int ptype) static int int_dh_size(const EVP_PKEY *pkey) { - return (DH_size(pkey->pkey.dh)); + return DH_size(pkey->pkey.dh); } static int dh_bits(const EVP_PKEY *pkey) diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c index d3d6ad68a9..066bf83336 100644 --- a/crypto/dh/dh_check.c +++ b/crypto/dh/dh_check.c @@ -49,7 +49,7 @@ int DH_check_params(const DH *dh, int *ret) BN_CTX_end(ctx); BN_CTX_free(ctx); } - return (ok); + return ok; } /*- @@ -139,7 +139,7 @@ int DH_check(const DH *dh, int *ret) BN_CTX_end(ctx); BN_CTX_free(ctx); } - return (ok); + return ok; } int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) @@ -177,5 +177,5 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) BN_CTX_end(ctx); BN_CTX_free(ctx); } - return (ok); + return ok; } diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c index 226c52d5d6..6901548ed6 100644 --- a/crypto/dh/dh_key.c +++ b/crypto/dh/dh_key.c @@ -150,7 +150,7 @@ static int generate_key(DH *dh) if (priv_key != dh->priv_key) BN_free(priv_key); BN_CTX_free(ctx); - return (ok); + return ok; } static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) @@ -204,7 +204,7 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) BN_CTX_end(ctx); BN_CTX_free(ctx); } - return (ret); + return ret; } static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index 746a1b4b18..a33f3246a3 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -139,12 +139,12 @@ int DH_up_ref(DH *r) int DH_set_ex_data(DH *d, int idx, void *arg) { - return (CRYPTO_set_ex_data(&d->ex_data, idx, arg)); + return CRYPTO_set_ex_data(&d->ex_data, idx, arg); } void *DH_get_ex_data(DH *d, int idx) { - return (CRYPTO_get_ex_data(&d->ex_data, idx)); + return CRYPTO_get_ex_data(&d->ex_data, idx); } int DH_bits(const DH *dh) @@ -154,7 +154,7 @@ int DH_bits(const DH *dh) int DH_size(const DH *dh) { - return (BN_num_bytes(dh->p)); + return BN_num_bytes(dh->p); } int DH_security_bits(const DH *dh) diff --git a/crypto/dh/dh_prn.c b/crypto/dh/dh_prn.c index 283fb0f4a3..aab1733db3 100644 --- a/crypto/dh/dh_prn.c +++ b/crypto/dh/dh_prn.c @@ -20,11 +20,11 @@ int DHparams_print_fp(FILE *fp, const DH *x) if ((b = BIO_new(BIO_s_file())) == NULL) { DHerr(DH_F_DHPARAMS_PRINT_FP, ERR_R_BUF_LIB); - return (0); + return 0; } BIO_set_fp(b, fp, BIO_NOCLOSE); ret = DHparams_print(b, x); BIO_free(b); - return (ret); + return ret; } #endif -- cgit v1.2.3