summaryrefslogtreecommitdiffstats
path: root/crypto/buffer
diff options
context:
space:
mode:
authorKaoruToda <kunnpuu@gmail.com>2017-10-17 23:04:09 +0900
committerMatt Caswell <matt@openssl.org>2017-10-18 16:05:06 +0100
commit26a7d938c9bf932a55cb5e4e02abb48fe395c5cd (patch)
treece5b1908c181722514aa80d03026c6f42ab85972 /crypto/buffer
parent2139145b72d084a3f974a94accd7d9812de286e4 (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/buffer')
-rw-r--r--crypto/buffer/buffer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index f3f8a1b55c..cbd2e53113 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -25,7 +25,7 @@ BUF_MEM *BUF_MEM_new_ex(unsigned long flags)
ret = BUF_MEM_new();
if (ret != NULL)
ret->flags = flags;
- return (ret);
+ return ret;
}
BUF_MEM *BUF_MEM_new(void)
@@ -35,9 +35,9 @@ BUF_MEM *BUF_MEM_new(void)
ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
BUFerr(BUF_F_BUF_MEM_NEW, ERR_R_MALLOC_FAILURE);
- return (NULL);
+ return NULL;
}
- return (ret);
+ return ret;
}
void BUF_MEM_free(BUF_MEM *a)
@@ -68,7 +68,7 @@ static char *sec_alloc_realloc(BUF_MEM *str, size_t len)
str->data = NULL;
}
}
- return (ret);
+ return ret;
}
size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
@@ -78,13 +78,13 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
if (str->length >= len) {
str->length = len;
- return (len);
+ return len;
}
if (str->max >= len) {
if (str->data != NULL)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
- return (len);
+ return len;
}
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION) {
@@ -105,7 +105,7 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
}
- return (len);
+ return len;
}
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
@@ -117,12 +117,12 @@ size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
if (str->data != NULL)
memset(&str->data[len], 0, str->length - len);
str->length = len;
- return (len);
+ return len;
}
if (str->max >= len) {
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
- return (len);
+ return len;
}
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION) {
@@ -143,7 +143,7 @@ size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
memset(&str->data[str->length], 0, len - str->length);
str->length = len;
}
- return (len);
+ return len;
}
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t size)