diff options
Diffstat (limited to 'nuttx/examples/nsh')
-rw-r--r-- | nuttx/examples/nsh/nsh.h | 3 | ||||
-rw-r--r-- | nuttx/examples/nsh/nsh_apps.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/examples/nsh/nsh.h b/nuttx/examples/nsh/nsh.h index 4f6811a6d..a6824f1b7 100644 --- a/nuttx/examples/nsh/nsh.h +++ b/nuttx/examples/nsh/nsh.h @@ -329,7 +329,8 @@ extern int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline); /* Application interface */ #ifdef CONFIG_EXAMPLES_NSH_BUILTIN_APPS -extern int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, const char *cmd, char *argv[]); +extern int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, + FAR char *argv[]); #endif /* I/O interfaces */ diff --git a/nuttx/examples/nsh/nsh_apps.c b/nuttx/examples/nsh/nsh_apps.c index e71ff9d1f..d1ce1d955 100644 --- a/nuttx/examples/nsh/nsh_apps.c +++ b/nuttx/examples/nsh/nsh_apps.c @@ -85,10 +85,11 @@ * Name: nsh_execute ****************************************************************************/ -int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, const char *cmd, char *argv[]) +int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, + FAR char *argv[]) { int ret = OK; - const char * name; + FAR const char * name; /* Try to find command within pre-built application list. */ @@ -101,7 +102,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, const char *cmd, char *argv[]) /* On failure, list the set of available built-in commands */ nsh_output(vtbl, "Builtin Apps: "); - for (i = 0; name = nuttapp_getname(i); i++) + for (i = 0; (name = nuttapp_getname(i)) != NULL; i++) { nsh_output(vtbl, "%s ", name); } |