shell: Remove redundant checking for first parameter
The way the command line parsing works, argv[0] is always guaranteed to be non-NULL as well as a non-empty string, so doing checks for this in get_cb() is redundant. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
04fbb80adb
commit
76fb522993
1 changed files with 0 additions and 5 deletions
|
@ -311,11 +311,6 @@ static shell_cmd_function_t get_cb(int *argc, char *argv[], int *module)
|
|||
const char *command;
|
||||
int i;
|
||||
|
||||
if (!first_string || first_string[0] == '\0') {
|
||||
printk("Illegal parameter\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!strcmp(first_string, "help")) {
|
||||
return show_help;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue