From: Pauli Date: Wed, 12 Jul 2017 22:23:22 +0000 (+1000) Subject: Change return (x) to return x X-Git-Tag: OpenSSL_1_1_1-pre1~1051 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=1f06acc08fc73a1828cca3f162d1dcd76b83a1cf;hp=a9a157e74a0c6a886e593426f263f3d7359497b9 Change return (x) to return x Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3912) --- diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 3f5c12d50b..88c4b53918 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -23,12 +23,12 @@ static int _asn1_check_infinite_end(const unsigned char **p, long len) * If there is 0 or 1 byte left, the length check should pick things up */ if (len <= 0) - return (1); + return 1; else if ((len >= 2) && ((*p)[0] == 0) && ((*p)[1] == 0)) { (*p) += 2; - return (1); + return 1; } - return (0); + return 0; } int ASN1_check_infinite_end(unsigned char **p, long len) @@ -96,10 +96,10 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, ret |= 0x80; } *pp = p; - return (ret | inf); + return ret | inf; err: ASN1err(ASN1_F_ASN1_GET_OBJECT, ASN1_R_HEADER_TOO_LONG); - return (0x80); + return 0x80; } /* @@ -275,7 +275,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) if (len < 0) { if (data == NULL) - return (0); + return 0; else len = strlen(data); } @@ -285,7 +285,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) if (str->data == NULL) { ASN1err(ASN1_F_ASN1_STRING_SET, ERR_R_MALLOC_FAILURE); str->data = c; - return (0); + return 0; } } str->length = len; @@ -294,7 +294,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) /* an allowance for strings :-) */ str->data[len] = '\0'; } - return (1); + return 1; } void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) @@ -306,7 +306,7 @@ void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) ASN1_STRING *ASN1_STRING_new(void) { - return (ASN1_STRING_type_new(V_ASN1_OCTET_STRING)); + return ASN1_STRING_type_new(V_ASN1_OCTET_STRING); } ASN1_STRING *ASN1_STRING_type_new(int type) @@ -316,10 +316,10 @@ ASN1_STRING *ASN1_STRING_type_new(int type) ret = OPENSSL_zalloc(sizeof(*ret)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW, ERR_R_MALLOC_FAILURE); - return (NULL); + return NULL; } ret->type = type; - return (ret); + return ret; } void asn1_string_embed_free(ASN1_STRING *a, int embed) @@ -356,11 +356,11 @@ int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) if (i == 0) { i = memcmp(a->data, b->data, a->length); if (i == 0) - return (a->type - b->type); + return a->type - b->type; else - return (i); + return i; } else - return (i); + return i; } int ASN1_STRING_length(const ASN1_STRING *x)