diff options
author | KaoruToda <kunnpuu@gmail.com> | 2017-10-17 23:04:09 +0900 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-10-18 16:05:06 +0100 |
commit | 26a7d938c9bf932a55cb5e4e02abb48fe395c5cd (patch) | |
tree | ce5b1908c181722514aa80d03026c6f42ab85972 /crypto/x509/x509_cmp.c | |
parent | 2139145b72d084a3f974a94accd7d9812de286e4 (diff) |
Remove parentheses of return.
Since return is inconsistent, I removed unnecessary parentheses and
unified them.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4541)
Diffstat (limited to 'crypto/x509/x509_cmp.c')
-rw-r--r-- | crypto/x509/x509_cmp.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index a5903fd97b..3d4931be4e 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -24,8 +24,8 @@ int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) bi = &b->cert_info; i = ASN1_INTEGER_cmp(&ai->serialNumber, &bi->serialNumber); if (i) - return (i); - return (X509_NAME_cmp(ai->issuer, bi->issuer)); + return i; + return X509_NAME_cmp(ai->issuer, bi->issuer); } #ifndef OPENSSL_NO_MD5 @@ -55,23 +55,23 @@ unsigned long X509_issuer_and_serial_hash(X509 *a) ) & 0xffffffffL; err: EVP_MD_CTX_free(ctx); - return (ret); + return ret; } #endif int X509_issuer_name_cmp(const X509 *a, const X509 *b) { - return (X509_NAME_cmp(a->cert_info.issuer, b->cert_info.issuer)); + return X509_NAME_cmp(a->cert_info.issuer, b->cert_info.issuer); } int X509_subject_name_cmp(const X509 *a, const X509 *b) { - return (X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject)); + return X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject); } int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b) { - return (X509_NAME_cmp(a->crl.issuer, b->crl.issuer)); + return X509_NAME_cmp(a->crl.issuer, b->crl.issuer); } int X509_CRL_match(const X509_CRL *a, const X509_CRL *b) @@ -81,24 +81,24 @@ int X509_CRL_match(const X509_CRL *a, const X509_CRL *b) X509_NAME *X509_get_issuer_name(const X509 *a) { - return (a->cert_info.issuer); + return a->cert_info.issuer; } unsigned long X509_issuer_name_hash(X509 *x) { - return (X509_NAME_hash(x->cert_info.issuer)); + return X509_NAME_hash(x->cert_info.issuer); } #ifndef OPENSSL_NO_MD5 unsigned long X509_issuer_name_hash_old(X509 *x) { - return (X509_NAME_hash_old(x->cert_info.issuer)); + return X509_NAME_hash_old(x->cert_info.issuer); } #endif X509_NAME *X509_get_subject_name(const X509 *a) { - return (a->cert_info.subject); + return a->cert_info.subject; } ASN1_INTEGER *X509_get_serialNumber(X509 *a) @@ -113,13 +113,13 @@ const ASN1_INTEGER *X509_get0_serialNumber(const X509 *a) unsigned long X509_subject_name_hash(X509 *x) { - return (X509_NAME_hash(x->cert_info.subject)); + return X509_NAME_hash(x->cert_info.subject); } #ifndef OPENSSL_NO_MD5 unsigned long X509_subject_name_hash_old(X509 *x) { - return (X509_NAME_hash_old(x->cert_info.subject)); + return X509_NAME_hash_old(x->cert_info.subject); } #endif @@ -194,7 +194,7 @@ unsigned long X509_NAME_hash(X509_NAME *x) ret = (((unsigned long)md[0]) | ((unsigned long)md[1] << 8L) | ((unsigned long)md[2] << 16L) | ((unsigned long)md[3] << 24L) ) & 0xffffffffL; - return (ret); + return ret; } #ifndef OPENSSL_NO_MD5 @@ -223,7 +223,7 @@ unsigned long X509_NAME_hash_old(X509_NAME *x) ) & 0xffffffffL; EVP_MD_CTX_free(md_ctx); - return (ret); + return ret; } #endif @@ -243,9 +243,9 @@ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, for (i = 0; i < sk_X509_num(sk); i++) { x509 = sk_X509_value(sk, i); if (X509_issuer_and_serial_cmp(x509, &x) == 0) - return (x509); + return x509; } - return (NULL); + return NULL; } X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name) @@ -256,9 +256,9 @@ X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name) for (i = 0; i < sk_X509_num(sk); i++) { x509 = sk_X509_value(sk, i); if (X509_NAME_cmp(X509_get_subject_name(x509), name) == 0) - return (x509); + return x509; } - return (NULL); + return NULL; } EVP_PKEY *X509_get0_pubkey(const X509 *x) |