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:
Johan Hedberg 2017-11-15 08:30:54 +02:00 committed by Johan Hedberg
commit 76fb522993

View file

@ -311,11 +311,6 @@ static shell_cmd_function_t get_cb(int *argc, char *argv[], int *module)
const char *command; const char *command;
int i; int i;
if (!first_string || first_string[0] == '\0') {
printk("Illegal parameter\n");
return NULL;
}
if (!strcmp(first_string, "help")) { if (!strcmp(first_string, "help")) {
return show_help; return show_help;
} }