Revert "sem_wait.c edited online with Bitbucket. Fix some correct but useless code."

What was I thinking?  I missed that litle minus sign and the possibility that the errno might be some positive non-zero value.

This reverts commit 43880878e4.
This commit is contained in:
Gregory Nutt
2017-10-05 16:01:01 -06:00
parent 43880878e4
commit 21c97b16cf
+2 -2
View File
@@ -187,7 +187,7 @@ int nxsem_wait(FAR sem_t *sem)
* race conditions.
*/
/* An error may have occurred while we were sleeping. Expected
/* Check if an error occurred while we were sleeping. Expected
* errors include EINTR meaning that we were awakened by a signal
* or ETIMEDOUT meaning that the timer expired for the case of
* sem_timedwait().
@@ -197,7 +197,7 @@ int nxsem_wait(FAR sem_t *sem)
* thread was restarted.
*/
ret = rtcb->pterrno;
ret = rtcb->pterrno != OK ? -rtcb->pterrno : OK;
rtcb->pterrno = saved_errno;
#ifdef CONFIG_PRIORITY_INHERITANCE