shell: Remove unnecessary first_string variable
This variable adds no value, and is in fact longer to spell out than
simply argv[0].
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c
index 039fa10..316476c 100644
--- a/subsys/shell/shell.c
+++ b/subsys/shell/shell.c
@@ -306,20 +306,19 @@
static shell_cmd_function_t get_cb(int *argc, char *argv[], int *module)
{
- const char *first_string = argv[0];
const struct shell_module *shell_module;
const char *command;
int i;
- if (!strcmp(first_string, "help")) {
+ if (!strcmp(argv[0], "help")) {
return show_help;
}
- if (!strcmp(first_string, "select")) {
+ if (!strcmp(argv[0], "select")) {
return select_module;
}
- if (!strcmp(first_string, "exit")) {
+ if (!strcmp(argv[0], "exit")) {
return exit_module;
}