semantic/parser: fix compile warning found by sparse

Reference:
https://linux.die.net/man/1/sparse

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-05-30 12:51:09 +08:00
committed by Xiang Xiao
parent f875db41d4
commit fb9b41221d
35 changed files with 67 additions and 19 deletions
+1 -1
View File
@@ -54,5 +54,5 @@ FAR void *mm_brkaddr(FAR struct mm_heap_s *heap, int region)
#endif
brkaddr = (uintptr_t)heap->mm_heapend[region];
return brkaddr ? (FAR void *)(brkaddr + SIZEOF_MM_ALLOCNODE) : 0;
return brkaddr ? (FAR void *)(brkaddr + SIZEOF_MM_ALLOCNODE) : NULL;
}