summaryrefslogtreecommitdiff
path: root/lib/libcrypto/engine
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/engine
parent09eb0761c8d7243f1ecd9af78bb13ddab0d30b0e (diff)
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'lib/libcrypto/engine')
-rw-r--r--lib/libcrypto/engine/eng_lib.c5
-rw-r--r--lib/libcrypto/engine/hw_cryptodev.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libcrypto/engine/eng_lib.c b/lib/libcrypto/engine/eng_lib.c
index 5ced58c86e0..ce8d7b30189 100644
--- a/lib/libcrypto/engine/eng_lib.c
+++ b/lib/libcrypto/engine/eng_lib.c
@@ -65,7 +65,7 @@ ENGINE *ENGINE_new(void)
{
ENGINE *ret;
- ret = (ENGINE *)malloc(sizeof(ENGINE));
+ ret = malloc(sizeof(ENGINE));
if(ret == NULL)
{
ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE);
@@ -152,8 +152,7 @@ static int int_cleanup_check(int create)
}
static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb)
{
- ENGINE_CLEANUP_ITEM *item = malloc(sizeof(
- ENGINE_CLEANUP_ITEM));
+ ENGINE_CLEANUP_ITEM *item = malloc(sizeof(ENGINE_CLEANUP_ITEM));
if(!item) return NULL;
item->cb = cb;
return item;
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c
index 7da9913d285..7700adf971d 100644
--- a/lib/libcrypto/engine/hw_cryptodev.c
+++ b/lib/libcrypto/engine/hw_cryptodev.c
@@ -908,7 +908,7 @@ crparam2bn(struct crparam *crp, BIGNUM *a)
if (bytes == 0)
return (-1);
- if ((pd = (u_int8_t *) malloc(bytes)) == NULL)
+ if ((pd = malloc(bytes)) == NULL)
return (-1);
for (i = 0; i < bytes; i++)