diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-28 15:28:14 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-28 15:28:14 -0400 |
commit | b196e7d936fb377d9c5b305748ac25ff0e53ef6d (patch) | |
tree | c855f0808899e5e7ef3a704c35f464ca36014964 /crypto/evp | |
parent | 3e47caff4830d2a117eda15b57a5feab89b846ae (diff) |
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/evp')
-rw-r--r-- | crypto/evp/bio_b64.c | 2 | ||||
-rw-r--r-- | crypto/evp/bio_enc.c | 2 | ||||
-rw-r--r-- | crypto/evp/bio_ok.c | 2 | ||||
-rw-r--r-- | crypto/evp/evp_pbe.c | 2 | ||||
-rw-r--r-- | crypto/evp/p_lib.c | 2 | ||||
-rw-r--r-- | crypto/evp/p_open.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index 8cbbf0253b..fe772fc34f 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -115,7 +115,7 @@ static int b64_new(BIO *bi) { BIO_B64_CTX *ctx; - ctx = (BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX)); + ctx = OPENSSL_malloc(sizeof(BIO_B64_CTX)); if (ctx == NULL) return (0); diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index faaed4de92..4409a91242 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -112,7 +112,7 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = (BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX)); + ctx = OPENSSL_malloc(sizeof(BIO_ENC_CTX)); if (ctx == NULL) return (0); EVP_CIPHER_CTX_init(&ctx->cipher); diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index ffdde6cf79..1aab2004ef 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -176,7 +176,7 @@ static int ok_new(BIO *bi) { BIO_OK_CTX *ctx; - ctx = (BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); + ctx = OPENSSL_malloc(sizeof(BIO_OK_CTX)); if (ctx == NULL) return (0); diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index 7db9511452..00fa72d8bb 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -228,7 +228,7 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, EVP_PBE_CTL *pbe_tmp; if (!pbe_algs) pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp); - if (!(pbe_tmp = (EVP_PBE_CTL *)OPENSSL_malloc(sizeof(EVP_PBE_CTL)))) { + if (!(pbe_tmp = OPENSSL_malloc(sizeof(EVP_PBE_CTL)))) { EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE, ERR_R_MALLOC_FAILURE); return 0; } diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index fb8f175fcb..c9e971ed85 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -185,7 +185,7 @@ EVP_PKEY *EVP_PKEY_new(void) { EVP_PKEY *ret; - ret = (EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY)); + ret = OPENSSL_malloc(sizeof(EVP_PKEY)); if (ret == NULL) { EVPerr(EVP_F_EVP_PKEY_NEW, ERR_R_MALLOC_FAILURE); return (NULL); diff --git a/crypto/evp/p_open.c b/crypto/evp/p_open.c index 229eb6417a..adaa42fa1e 100644 --- a/crypto/evp/p_open.c +++ b/crypto/evp/p_open.c @@ -88,7 +88,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, } size = RSA_size(priv->pkey.rsa); - key = (unsigned char *)OPENSSL_malloc(size + 2); + key = OPENSSL_malloc(size + 2); if (key == NULL) { /* ERROR */ EVPerr(EVP_F_EVP_OPENINIT, ERR_R_MALLOC_FAILURE); |