mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
simplify MEM_ALIGN_SIZE macro
This commit is contained in:
parent
7e73e4728d
commit
c3fa5819fd
@ -49,9 +49,7 @@ void mem_free(void *mem);
|
||||
void *mem_realloc(void *mem, mem_size_t size);
|
||||
void *mem_reallocm(void *mem, mem_size_t size);
|
||||
|
||||
#define MEM_ALIGN_SIZE(size) (size + \
|
||||
((((size) % MEM_ALIGNMENT) == 0)? 0 : \
|
||||
(MEM_ALIGNMENT - ((size) % MEM_ALIGNMENT))))
|
||||
#define MEM_ALIGN_SIZE(size) ((size + MEM_ALIGNMENT - 1) & ~(MEM_ALIGNMENT-1))
|
||||
|
||||
#define MEM_ALIGN(addr) (void *)MEM_ALIGN_SIZE((mem_ptr_t)addr)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user