diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h index 5563a2d466..f7c5549939 100644 --- a/mm/mm_heap/mm.h +++ b/mm/mm_heap/mm.h @@ -151,11 +151,11 @@ /* Check if node/prenode is free */ -#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_ALLOC(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_FREE(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) /**************************************************************************** * Public Types