From 800fbde652d67326eeb163d56d8f72ebb239b3c4 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 7 Jun 2014 14:41:57 +0000 Subject: malloc() result does not need a cast. ok miod --- src/lib/libcrypto/engine/eng_lib.c | 5 ++--- src/lib/libcrypto/engine/hw_cryptodev.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/engine') diff --git a/src/lib/libcrypto/engine/eng_lib.c b/src/lib/libcrypto/engine/eng_lib.c index 5ced58c86e..ce8d7b3018 100644 --- a/src/lib/libcrypto/engine/eng_lib.c +++ b/src/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/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c index 7da9913d28..7700adf971 100644 --- a/src/lib/libcrypto/engine/hw_cryptodev.c +++ b/src/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++) -- cgit v1.2.3-55-g6feb