summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/rsa/rsa_sign.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-07 14:41:56 +0000
committerderaadt <deraadt@openbsd.org>2014-06-07 14:41:56 +0000
commit4163340b499b485e883e0fa2e5cb8184fd8c0a18 (patch)
tree0c44f8a082e5dc6c4f9d0af733243d1a96651790 /lib/libcrypto/rsa/rsa_sign.c
parentRemove another NULL check before a BIO_free(). (diff)
downloadwireguard-openbsd-4163340b499b485e883e0fa2e5cb8184fd8c0a18.tar.xz
wireguard-openbsd-4163340b499b485e883e0fa2e5cb8184fd8c0a18.zip
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'lib/libcrypto/rsa/rsa_sign.c')
-rw-r--r--lib/libcrypto/rsa/rsa_sign.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/rsa/rsa_sign.c b/lib/libcrypto/rsa/rsa_sign.c
index f9772bbce70..c6f7b0a3a3f 100644
--- a/lib/libcrypto/rsa/rsa_sign.c
+++ b/lib/libcrypto/rsa/rsa_sign.c
@@ -120,7 +120,7 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
return(0);
}
if(type != NID_md5_sha1) {
- tmps=(unsigned char *)malloc((unsigned int)j+1);
+ tmps = malloc((unsigned int)j+1);
if (tmps == NULL)
{
RSAerr(RSA_F_RSA_SIGN,ERR_R_MALLOC_FAILURE);
@@ -169,7 +169,7 @@ int int_rsa_verify(int dtype, const unsigned char *m,
return 1;
}
- s=(unsigned char *)malloc((unsigned int)siglen);
+ s = malloc((unsigned int)siglen);
if (s == NULL)
{
RSAerr(RSA_F_INT_RSA_VERIFY,ERR_R_MALLOC_FAILURE);