xiaoxiang781216 commented on code in PR #8074:
URL: https://github.com/apache/nuttx/pull/8074#discussion_r1067138489


##########
sched/semaphore/sem_setprotocol.c:
##########
@@ -103,10 +96,11 @@ int nxsem_set_protocol(FAR sem_t *sem, int protocol)
         return -ENOTSUP;
 
       default:
-        break;
+        return -EINVAL;
     }
 
-  return -EINVAL;
+  sem->flags = protocol;

Review Comment:
   Yes, it's called inside nxmutex_init, so it doesn't break the compatibility 
of user code.



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to