patacongo commented on a change in pull request #3170:
URL: https://github.com/apache/incubator-nuttx/pull/3170#discussion_r600952362



##########
File path: libs/libc/unistd/lib_getopt.c
##########
@@ -128,11 +134,11 @@ int getopt(int argc, FAR char * const argv[], FAR const 
char *optstring)
        * the program, optind must be reset to some value <= 1.
        */
 
-      if (optind < 1 || !g_binitialized)
+      if (go->go_optind < 1 || !g_binitialized)
         {
-          optarg         = NULL;
-          optind         = 1;     /* Skip over the program name */
-          optopt         = '?';
+          go->go_optarg  = NULL;
+          go->go_optind  = 1;     /* Skip over the program name */
+          go->go_optopt  = '?';
           g_optptr       = NULL;  /* Start at the beginning of the first 
argument */
           g_binitialized = true;  /* Now we are initialized */

Review comment:
       Done!  Thanks for your good eyes!




-- 
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:
[email protected]


Reply via email to