aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio/bf_buff.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-28 15:28:14 -0400
committerRich Salz <rsalz@openssl.org>2015-04-28 15:28:14 -0400
commitb196e7d936fb377d9c5b305748ac25ff0e53ef6d (patch)
treec855f0808899e5e7ef3a704c35f464ca36014964 /crypto/bio/bf_buff.c
parent3e47caff4830d2a117eda15b57a5feab89b846ae (diff)
downloadopenssl-b196e7d936fb377d9c5b305748ac25ff0e53ef6d.tar.gz
remove malloc casts
Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/bio/bf_buff.c')
-rw-r--r--crypto/bio/bf_buff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c
index 0e998d656a..d82385a06c 100644
--- a/crypto/bio/bf_buff.c
+++ b/crypto/bio/bf_buff.c
@@ -93,15 +93,15 @@ static int buffer_new(BIO *bi)
{
BIO_F_BUFFER_CTX *ctx;
- ctx = (BIO_F_BUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_F_BUFFER_CTX));
+ ctx = OPENSSL_malloc(sizeof(BIO_F_BUFFER_CTX));
if (ctx == NULL)
return (0);
- ctx->ibuf = (char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
+ ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
if (ctx->ibuf == NULL) {
OPENSSL_free(ctx);
return (0);
}
- ctx->obuf = (char *)OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
+ ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
if (ctx->obuf == NULL) {
OPENSSL_free(ctx->ibuf);
OPENSSL_free(ctx);
@@ -366,12 +366,12 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr)
p1 = ctx->ibuf;
p2 = ctx->obuf;
if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
- p1 = (char *)OPENSSL_malloc((int)num);
+ p1 = OPENSSL_malloc((int)num);
if (p1 == NULL)
goto malloc_error;
}
if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
- p2 = (char *)OPENSSL_malloc((int)num);
+ p2 = OPENSSL_malloc((int)num);
if (p2 == NULL) {
if (p1 != ctx->ibuf)
OPENSSL_free(p1);