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 2021/06/07 21:21:36 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #3867: TLS: Correct handling of returned error values.

patacongo opened a new pull request #3867:
URL: https://github.com/apache/incubator-nuttx/pull/3867


   ## Summary
   
   I note two problems in handling of the return error values in PR #3858:
   
   1. In KERNEL mode, the error return value of _SEM_WAIT() will be a negated errno value; in all other modes, it will be -1 (ERROR) with the errno variable set.  This must be handled in the test of the returned value:  Don't compare with -1; rather check if < 0
   2. Also, conversion of the returned value to a negated errno value must be handled differently.  This is handled by replacing -get_errno() with the macro _ERRVAL(ret)
   
   ## Impact
   
   This effects only error handling (it fixes it) and no other impacts are expected.
   
   ## Testing
   
   CI only
   
   


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

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



[GitHub] [incubator-nuttx] gustavonihei merged pull request #3867: TLS: Correct handling of returned error values.

Posted by GitBox <gi...@apache.org>.
gustavonihei merged pull request #3867:
URL: https://github.com/apache/incubator-nuttx/pull/3867


   


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

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



[GitHub] [incubator-nuttx] patacongo commented on pull request #3867: TLS: Correct handling of returned error values.

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3867:
URL: https://github.com/apache/incubator-nuttx/pull/3867#issuecomment-856269793


   @no1wudi Please review


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

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