Don't cast |OPENSSL_malloc|/|OPENSSL_realloc| result. C has implicit conversion of |void *| to other pointer types so these casts are unnecessary. Clean them up to make the code easier to read and to make it easier to find dangerous casts. Change-Id: I26988a672e8ed4d69c75cfbb284413999b475464 Reviewed-on: https://boringssl-review.googlesource.com/7102 Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index a64e9d8..216514d 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c
@@ -373,7 +373,7 @@ ssl3_cleanup_key_block(ssl); - uint8_t *keyblock = (uint8_t *)OPENSSL_malloc(key_block_len); + uint8_t *keyblock = OPENSSL_malloc(key_block_len); if (keyblock == NULL) { OPENSSL_PUT_ERROR(SSL, ERR_R_MALLOC_FAILURE); return 0;