diff options
Diffstat (limited to 'avr/command.c')
-rw-r--r-- | avr/command.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/avr/command.c b/avr/command.c index c080527..ed25dee 100644 --- a/avr/command.c +++ b/avr/command.c @@ -1,4 +1,13 @@ /* + * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de> + * + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/* * Command Processor Table */ @@ -111,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] @@ -140,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 ? */ |