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>
This commit is contained in:
Rich Salz
2015-04-28 15:28:14 -04:00
parent 3e47caff48
commit b196e7d936
114 changed files with 191 additions and 226 deletions

View File

@@ -276,7 +276,7 @@ SSL *SSL_new(SSL_CTX *ctx)
return (NULL);
}
s = (SSL *)OPENSSL_malloc(sizeof(SSL));
s = OPENSSL_malloc(sizeof(SSL));
if (s == NULL)
goto err;
memset(s, 0, sizeof(SSL));
@@ -1868,7 +1868,7 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
goto err;
}
ret = (SSL_CTX *)OPENSSL_malloc(sizeof(SSL_CTX));
ret = OPENSSL_malloc(sizeof(SSL_CTX));
if (ret == NULL)
goto err;