mm/mm_heap: add parenthesis in macro definition

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-09-15 22:23:54 +03:00 committed by Xiang Xiao
parent c56aa7b527
commit 1c2931222c

View File

@ -151,11 +151,11 @@
/* Check if node/prenode is free */ /* Check if node/prenode is free */
#define MM_NODE_IS_ALLOC(node) ((node->size & MM_ALLOC_BIT) != 0) #define MM_NODE_IS_ALLOC(node) (((node)->size & MM_ALLOC_BIT) != 0)
#define MM_NODE_IS_FREE(node) ((node->size & MM_ALLOC_BIT) == 0) #define MM_NODE_IS_FREE(node) (((node)->size & MM_ALLOC_BIT) == 0)
#define MM_PREVNODE_IS_ALLOC(node) ((node->size & MM_PREVFREE_BIT) == 0) #define MM_PREVNODE_IS_ALLOC(node) (((node)->size & MM_PREVFREE_BIT) == 0)
#define MM_PREVNODE_IS_FREE(node) ((node->size & MM_PREVFREE_BIT) != 0) #define MM_PREVNODE_IS_FREE(node) (((node)->size & MM_PREVFREE_BIT) != 0)
/**************************************************************************** /****************************************************************************
* Public Types * Public Types