shell: Fix unnecessary passing by reference of argc
The get_cb() function does not modify argc, so there's no point in passing it by reference. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
39a733151d
commit
74556b7abb
1 changed files with 3 additions and 3 deletions
|
@ -304,7 +304,7 @@ static int exit_module(int argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
static shell_cmd_function_t get_cb(int *argc, char *argv[], int *module)
|
||||
static shell_cmd_function_t get_cb(int argc, char *argv[], int *module)
|
||||
{
|
||||
const struct shell_module *shell_module;
|
||||
const char *command;
|
||||
|
@ -322,7 +322,7 @@ static shell_cmd_function_t get_cb(int *argc, char *argv[], int *module)
|
|||
return exit_module;
|
||||
}
|
||||
|
||||
if ((*argc == 1) && (default_module == -1)) {
|
||||
if ((argc == 1) && (default_module == -1)) {
|
||||
printk("Missing parameter\n");
|
||||
return NULL;
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ int shell_exec(char *line)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
cb = get_cb(&argc, argv, &module);
|
||||
cb = get_cb(argc, argv, &module);
|
||||
if (!cb) {
|
||||
if (app_cmd_handler != NULL) {
|
||||
cb = app_cmd_handler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue