Add parens around ROUND_TO_ALIGN's parameter.
This makes the macro robust against a hypothetical ROUND_TO_ALIGN(foo ? sizeA : size B) invocation.
This commit is contained in:
parent
f2d9aeae6d
commit
b6f649889a
@ -113,7 +113,7 @@ static SECP256K1_INLINE void *checked_realloc(const secp256k1_callback* cb, void
|
|||||||
#define ALIGNMENT 16
|
#define ALIGNMENT 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ROUND_TO_ALIGN(size) (((size + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)
|
#define ROUND_TO_ALIGN(size) ((((size) + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)
|
||||||
|
|
||||||
/* Assume there is a contiguous memory object with bounds [base, base + max_size)
|
/* Assume there is a contiguous memory object with bounds [base, base + max_size)
|
||||||
* of which the memory range [base, *prealloc_ptr) is already allocated for usage,
|
* of which the memory range [base, *prealloc_ptr) is already allocated for usage,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user