Merge #875: Avoid casting (void**) values.

27306186045955803ca4070783c6a28853003e6a Avoid casting (void**) values. Replaced with an expression that only casts (void*) values. (Russell O'Connor)

Pull request description:

ACKs for top commit:
  sipa:
    utACK 27306186045955803ca4070783c6a28853003e6a
  real-or-random:
    utACK 2730618604
  jonasnick:
    utACK 27306186045955803ca4070783c6a28853003e6a

Tree-SHA512: bdc1e9eefa10f79b744ef6ae83f379faff7bce9fb428c3bcfcc3f6e4e252e5c6543efbe0f84760709850948cbc8a432772c76a6c5f6b8cd18cb2d862b324912d
This commit is contained in:
Jonas Nick 2021-01-25 13:35:53 +00:00
commit b732701faa
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -141,7 +141,7 @@ static SECP256K1_INLINE void *manual_alloc(void** prealloc_ptr, size_t alloc_siz
VERIFY_CHECK(((unsigned char*)*prealloc_ptr - (unsigned char*)base) % ALIGNMENT == 0); VERIFY_CHECK(((unsigned char*)*prealloc_ptr - (unsigned char*)base) % ALIGNMENT == 0);
VERIFY_CHECK((unsigned char*)*prealloc_ptr - (unsigned char*)base + aligned_alloc_size <= max_size); VERIFY_CHECK((unsigned char*)*prealloc_ptr - (unsigned char*)base + aligned_alloc_size <= max_size);
ret = *prealloc_ptr; ret = *prealloc_ptr;
*((unsigned char**)prealloc_ptr) += aligned_alloc_size; *prealloc_ptr = (unsigned char*)*prealloc_ptr + aligned_alloc_size;
return ret; return ret;
} }