remove malloc casts
[openssl.git] / crypto / asn1 / f_string.c
index 6a6cf3471408b24f00cfc98bcf82e4812099fd5f..6cb4cfdff99a133e79272d56e60d26f6d9247515 100644 (file)
@@ -158,12 +158,9 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
         i /= 2;
         if (num + i > slen) {
             if (s == NULL)
-                sp = (unsigned char *)OPENSSL_malloc((unsigned int)num +
-                                                     i * 2);
+                sp = OPENSSL_malloc((unsigned int)num + i * 2);
             else
-                sp = (unsigned char *)OPENSSL_realloc(s,
-                                                      (unsigned int)num +
-                                                      i * 2);
+                sp = OPENSSL_realloc(s, (unsigned int)num + i * 2);
             if (sp == NULL) {
                 ASN1err(ASN1_F_A2I_ASN1_STRING, ERR_R_MALLOC_FAILURE);
                 if (s != NULL)