mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 21:27:46 +00:00
[code-utils] fix wrong pointer size in otALIGN (#3468)
This commit is contained in:
@@ -57,7 +57,8 @@
|
||||
* @returns The aligned pointer.
|
||||
*
|
||||
*/
|
||||
#define otALIGN(aPointer, aAlignment) ((void *)(((uintptr_t)(aPointer) + (aAlignment)-1U) & ~((aAlignment)-1U)))
|
||||
#define otALIGN(aPointer, aAlignment) \
|
||||
((void *)(((uintptr_t)(aPointer) + (aAlignment)-1UL) & ~((uintptr_t)(aAlignment)-1UL)))
|
||||
|
||||
// Calculates the aligned variable size.
|
||||
#define otALIGNED_VAR_SIZE(size, align_type) (((size) + (sizeof(align_type) - 1)) / sizeof(align_type))
|
||||
|
||||
Reference in New Issue
Block a user