diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-28 21:28:14 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-28 21:28:14 +0200 |
commit | b196e7d936fb377d9c5b305748ac25ff0e53ef6d (patch) | |
tree | c855f0808899e5e7ef3a704c35f464ca36014964 /crypto/asn1/a_bitstr.c | |
parent | ERR_ cleanup (diff) | |
download | openssl-b196e7d936fb377d9c5b305748ac25ff0e53ef6d.tar.xz openssl-b196e7d936fb377d9c5b305748ac25ff0e53ef6d.zip |
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/asn1/a_bitstr.c')
-rw-r--r-- | crypto/asn1/a_bitstr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c index 24cdb0f66a..8a9e17cb27 100644 --- a/crypto/asn1/a_bitstr.c +++ b/crypto/asn1/a_bitstr.c @@ -156,7 +156,7 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, ret->flags |= (ASN1_STRING_FLAG_BITS_LEFT | i); /* set */ if (len-- > 1) { /* using one because of the bits left byte */ - s = (unsigned char *)OPENSSL_malloc((int)len); + s = OPENSSL_malloc((int)len); if (s == NULL) { i = ERR_R_MALLOC_FAILURE; goto err; @@ -206,10 +206,9 @@ int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value) if (!value) return (1); /* Don't need to set */ if (a->data == NULL) - c = (unsigned char *)OPENSSL_malloc(w + 1); + c = OPENSSL_malloc(w + 1); else - c = (unsigned char *)OPENSSL_realloc_clean(a->data, - a->length, w + 1); + c = OPENSSL_realloc_clean(a->data, a->length, w + 1); if (c == NULL) { ASN1err(ASN1_F_ASN1_BIT_STRING_SET_BIT, ERR_R_MALLOC_FAILURE); return 0; |