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/04/02 14:37:02 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #3280: Correct some getopt() logic

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


   ## Summary
   
   1. Null pointer dereference:
   
   -  for (ndx = 0; longopts[ndx].name[0] != '\0'; ndx++)
   +  for (ndx = 0; longopts[ndx].name != NULL; ndx++)
   
   2. Handle single character long options.  An option like -x could be either a short option or a long option (under getopt_long_only()).  This case was not being handled correctly.
   
   3. Add missing support for optional arguments to short options (indicated with two "::"
   
   ## Impact
   
   This effects all members of the getopt() family of APIs.
   
   ## Testing
   
   Tested on the simulator using extensions to apps/testing/ostest.
   
   
   


-- 
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] Ouss4 merged pull request #3280: Correct some getopt() logic

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


   


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