From 27306186045955803ca4070783c6a28853003e6a Mon Sep 17 00:00:00 2001 From: Russell O'Connor Date: Sat, 23 Jan 2021 15:22:54 -0500 Subject: [PATCH] Avoid casting (void**) values. Replaced with an expression that only casts (void*) values. --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index 931f71c84cbc2..2644e00438d3a 100644 --- a/src/util.h +++ b/src/util.h @@ -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 + aligned_alloc_size <= max_size); ret = *prealloc_ptr; - *((unsigned char**)prealloc_ptr) += aligned_alloc_size; + *prealloc_ptr = (unsigned char*)*prealloc_ptr + aligned_alloc_size; return ret; }