You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/03 13:22:31 UTC

[GitHub] [incubator-nuttx] easonxiang commented on a diff in pull request #6995: mm: Check the function result with suitable macro.

easonxiang commented on code in PR #6995:
URL: https://github.com/apache/incubator-nuttx/pull/6995#discussion_r962153628


##########
mm/mm_heap/mm_extend.c:
##########
@@ -77,7 +77,7 @@ void mm_extend(FAR struct mm_heap_s *heap, FAR void *mem, size_t size,
 
   /* Take the memory manager semaphore */
 
-  DEBUGVERIFY(mm_takesemaphore(heap));
+  DEBUGASSERT(mm_takesemaphore(heap));

Review Comment:
   Both define are not empty when CONFIG_DEBUG_ASSERTIONS isn't defined
   `#  define DEBUGASSERT(f) ((void)(1 || (f)))`
   `#  define DEBUGVERIFY(f) ((void)(f))`
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org