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 2022/05/12 04:45:11 UTC

[GitHub] [incubator-nuttx-apps] anchao commented on a diff in pull request #1163: system/trace: correct arg index if command is alreay set

anchao commented on code in PR #1163:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1163#discussion_r870941705


##########
system/trace/trace.c:
##########
@@ -793,38 +793,40 @@ static void show_usage(void)
   fprintf(stderr,
           "\nUsage: trace <subcommand>...\n"
           "Subcommand:\n"
-          "  start [-c][<duration>]          :"
+          "\tstart [-c][<duration>]\t\t:"

Review Comment:
   Done



##########
system/trace/trace.c:
##########
@@ -502,12 +502,15 @@ static int trace_cmd_switch(int index, int argc, FAR char **argv,
       if (argv[index][0] == '-' || argv[index][0] == '+')
         {
           enable = (argv[index][0] == '+');
+
+          index++;
+

Review Comment:
   Done



##########
system/trace/trace.c:
##########
@@ -755,12 +756,15 @@ static int trace_cmd_print(int index, int argc, FAR char **argv,
       if (argv[index][0] == '-' || argv[index][0] == '+')
         {
           enable = (argv[index][0] == '+');
+
+          index++;
+

Review Comment:
   Done



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

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