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/asn1 | |
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/asn1')
-rw-r--r-- | crypto/asn1/a_bitstr.c | 6 | ||||
-rw-r--r-- | crypto/asn1/a_digest.c | 4 | ||||
-rw-r--r-- | crypto/asn1/a_print.c | 4 | ||||
-rw-r--r-- | crypto/asn1/evp_asn1.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index b2e0fb6882..b192621551 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -24,7 +24,7 @@ int i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp) unsigned char *p, *d; if (a == NULL) - return (0); + return 0; len = a->length; @@ -175,7 +175,7 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) a->data[w] = ((a->data[w]) & iv) | v; while ((a->length > 0) && (a->data[a->length - 1] == 0)) a->length--; - return (1); + return 1; } int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) @@ -185,7 +185,7 @@ int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n) w = n / 8; v = 1 << (7 - (n & 0x07)); if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL)) - return (0); + return 0; return ((a->data[w] & v) != 0); } diff --git a/crypto/asn1/a_digest.c b/crypto/asn1/a_digest.c index c84ecc9b4b..5945041d82 100644 --- a/crypto/asn1/a_digest.c +++ b/crypto/asn1/a_digest.c @@ -39,7 +39,7 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, return 0; } OPENSSL_free(str); - return (1); + return 1; } #endif @@ -59,5 +59,5 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, return 0; } OPENSSL_free(str); - return (1); + return 1; } diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c index ed72b51926..fd466d287c 100644 --- a/crypto/asn1/a_print.c +++ b/crypto/asn1/a_print.c @@ -62,7 +62,7 @@ int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s) *(p) = '\0'; s->length /= 4; s->type = ASN1_PRINTABLE_type(s->data, s->length); - return (1); + return 1; } int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v) @@ -91,5 +91,5 @@ int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v) if (n > 0) if (BIO_write(bp, buf, n) <= 0) return (0); - return (1); + return 1; } diff --git a/crypto/asn1/evp_asn1.c b/crypto/asn1/evp_asn1.c index f3b675e379..d115911d0f 100644 --- a/crypto/asn1/evp_asn1.c +++ b/crypto/asn1/evp_asn1.c @@ -23,7 +23,7 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len) return 0; } ASN1_TYPE_set(a, V_ASN1_OCTET_STRING, os); - return (1); + return 1; } /* int max_len: for returned value */ |