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/10/20 17:47:47 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7372: use DEBUGASSERT instead of unnecessary check

pkarashchenko commented on code in PR #7372:
URL: https://github.com/apache/incubator-nuttx/pull/7372#discussion_r1000940325


##########
libs/libc/semaphore/sem_init.c:
##########
@@ -67,31 +68,28 @@ int nxsem_init(FAR sem_t *sem, int pshared, unsigned int value)
    * range.
    */
 
-  if (sem != NULL && value <= SEM_VALUE_MAX)
-    {
-      /* Initialize the semaphore count */
+  DEBUGASSERT(sem != NULL && value <= SEM_VALUE_MAX);

Review Comment:
   That is not quite good from application perspective



-- 
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