mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
arch/tricore: remove magic number in tricore_checkstack.c
before: | start = (alloc + 3) & ~3; | end = (alloc + size) & ~3; after: | start = STACK_ALIGN_UP((uintptr_t)alloc); | end = STACK_ALIGN_DOWN((uintptr_t)alloc + size); Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
committed by
Alan C. Assis
parent
12486d21dc
commit
5d80cf7b83
@@ -79,8 +79,8 @@ size_t tricore_stack_check(uintptr_t alloc, size_t size)
|
||||
|
||||
/* Get aligned addresses of the top and bottom of the stack */
|
||||
|
||||
start = (alloc + 3) & ~3;
|
||||
end = (alloc + size) & ~3;
|
||||
start = STACK_ALIGN_UP((uintptr_t)alloc);
|
||||
end = STACK_ALIGN_DOWN((uintptr_t)alloc + size);
|
||||
|
||||
/* Get the adjusted size based on the top and bottom of the stack */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user