aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dso
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/dso
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/dso')
-rw-r--r--crypto/dso/dso_lib.c5
-rw-r--r--crypto/dso/dso_win32.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index 09b8eafcca..c1d6d2544f 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -96,14 +96,15 @@ DSO *DSO_new_method(DSO_METHOD *meth)
{
DSO *ret;
- if (default_DSO_meth == NULL)
+ if (default_DSO_meth == NULL) {
/*
* We default to DSO_METH_openssl() which in turn defaults to
* stealing the "best available" method. Will fallback to
* DSO_METH_null() in the worst case.
*/
default_DSO_meth = DSO_METHOD_openssl();
- ret = (DSO *)OPENSSL_malloc(sizeof(DSO));
+ }
+ ret = OPENSSL_malloc(sizeof(DSO));
if (ret == NULL) {
DSOerr(DSO_F_DSO_NEW_METHOD, ERR_R_MALLOC_FAILURE);
return (NULL);
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index e671672920..2499fc152b 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -168,7 +168,7 @@ static int win32_load(DSO *dso)
ERR_add_error_data(3, "filename(", filename, ")");
goto err;
}
- p = (HINSTANCE *) OPENSSL_malloc(sizeof(HINSTANCE));
+ p = OPENSSL_malloc(sizeof(HINSTANCE));
if (p == NULL) {
DSOerr(DSO_F_WIN32_LOAD, ERR_R_MALLOC_FAILURE);
goto err;