summaryrefslogtreecommitdiff
path: root/lib/libcrypto/evp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-06-07 14:41:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-06-07 14:41:58 +0000
commit266f7f14bb884216f7d07623deb97d8d3487e964 (patch)
tree8b13bd4c0ad356be648d746cb75b920d0e35f921 /lib/libcrypto/evp
parent09eb0761c8d7243f1ecd9af78bb13ddab0d30b0e (diff)
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'lib/libcrypto/evp')
-rw-r--r--lib/libcrypto/evp/bio_b64.c2
-rw-r--r--lib/libcrypto/evp/bio_enc.c2
-rw-r--r--lib/libcrypto/evp/bio_ok.c2
-rw-r--r--lib/libcrypto/evp/p_lib.c2
-rw-r--r--lib/libcrypto/evp/p_open.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcrypto/evp/bio_b64.c b/lib/libcrypto/evp/bio_b64.c
index 465753cf16f..9a08d3356dc 100644
--- a/lib/libcrypto/evp/bio_b64.c
+++ b/lib/libcrypto/evp/bio_b64.c
@@ -113,7 +113,7 @@ b64_new(BIO *bi)
{
BIO_B64_CTX *ctx;
- ctx = (BIO_B64_CTX *)malloc(sizeof(BIO_B64_CTX));
+ ctx = malloc(sizeof(BIO_B64_CTX));
if (ctx == NULL)
return (0);
diff --git a/lib/libcrypto/evp/bio_enc.c b/lib/libcrypto/evp/bio_enc.c
index df817b9d8fe..965f2ab623d 100644
--- a/lib/libcrypto/evp/bio_enc.c
+++ b/lib/libcrypto/evp/bio_enc.c
@@ -108,7 +108,7 @@ enc_new(BIO *bi)
{
BIO_ENC_CTX *ctx;
- ctx = (BIO_ENC_CTX *)malloc(sizeof(BIO_ENC_CTX));
+ ctx = malloc(sizeof(BIO_ENC_CTX));
if (ctx == NULL)
return (0);
EVP_CIPHER_CTX_init(&ctx->cipher);
diff --git a/lib/libcrypto/evp/bio_ok.c b/lib/libcrypto/evp/bio_ok.c
index 882aaee0fb5..3ba40485a22 100644
--- a/lib/libcrypto/evp/bio_ok.c
+++ b/lib/libcrypto/evp/bio_ok.c
@@ -178,7 +178,7 @@ ok_new(BIO *bi)
{
BIO_OK_CTX *ctx;
- ctx = (BIO_OK_CTX *)malloc(sizeof(BIO_OK_CTX));
+ ctx = malloc(sizeof(BIO_OK_CTX));
if (ctx == NULL)
return (0);
diff --git a/lib/libcrypto/evp/p_lib.c b/lib/libcrypto/evp/p_lib.c
index 97d922d1bab..b13163b26f1 100644
--- a/lib/libcrypto/evp/p_lib.c
+++ b/lib/libcrypto/evp/p_lib.c
@@ -188,7 +188,7 @@ EVP_PKEY_new(void)
{
EVP_PKEY *ret;
- ret = (EVP_PKEY *)malloc(sizeof(EVP_PKEY));
+ ret = malloc(sizeof(EVP_PKEY));
if (ret == NULL) {
EVPerr(EVP_F_EVP_PKEY_NEW, ERR_R_MALLOC_FAILURE);
return (NULL);
diff --git a/lib/libcrypto/evp/p_open.c b/lib/libcrypto/evp/p_open.c
index 88c0a455443..c10d7959c38 100644
--- a/lib/libcrypto/evp/p_open.c
+++ b/lib/libcrypto/evp/p_open.c
@@ -88,7 +88,7 @@ EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
}
size = RSA_size(priv->pkey.rsa);
- key = (unsigned char *)malloc(size + 2);
+ key = malloc(size + 2);
if (key == NULL) {
/* ERROR */
EVPerr(EVP_F_EVP_OPENINIT, ERR_R_MALLOC_FAILURE);