]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/command.c
Bufix mstep command: take the right arg for parameter count.
[z180-stamp.git] / avr / command.c
index b6fa41864f6fba3b87e410e4381ff98fc4d1c81b..ed25dee4f82876ee61915eeb2f1b4f21cd335691 100644 (file)
@@ -120,7 +120,7 @@ command_ret_t _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp,
         */
        for (i = 1; i < argc; ++i) {
                if ((cmdtp = find_cmd_tbl (argv[i], cmd_start, cmd_items )) != NULL) {
-                       rcode = cmd_usage(cmdtp);
+                       cmd_usage(cmdtp);
                } else {
                        printf_P(PSTR("Unknown command '%s' - try 'help'"
                                " without arguments.\n\n"), argv[i]
@@ -149,8 +149,8 @@ cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len)
        for (cmdtp = table;
             cmdtp != table + table_len;
             cmdtp++) {
-               if (strncmp_P (cmd, cmdtp->name, len) == 0) {
-                       if (len == strlen (cmdtp->name))
+               if (strncmp_P(cmd, cmdtp->name, len) == 0) {
+                       if (len == strlen_P(cmdtp->name))
                                return cmdtp;   /* full match */
 
                        cmdtp_temp = cmdtp;     /* abbreviated command ? */