diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-01 16:47:20 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-01 16:47:20 -0600 |
commit | 54ede74b8afa37595a4bb766033b981d4ace00e2 (patch) | |
tree | eb66e65fd4b27c2f331b95d0c5fed8c6c30a7903 /apps | |
parent | a9f3da8d9992b2328d43f946a6b0689a28a3c98f (diff) | |
download | nuttx-54ede74b8afa37595a4bb766033b981d4ace00e2.tar.gz nuttx-54ede74b8afa37595a4bb766033b981d4ace00e2.tar.bz2 nuttx-54ede74b8afa37595a4bb766033b981d4ace00e2.zip |
Fix NSH PS command: If there are not argument, it would print garbage for argument list
Diffstat (limited to 'apps')
-rw-r--r-- | apps/nshlib/nsh_proccmds.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/nshlib/nsh_proccmds.c b/apps/nshlib/nsh_proccmds.c index 0d57777d3..0cbc0f8de 100644 --- a/apps/nshlib/nsh_proccmds.c +++ b/apps/nshlib/nsh_proccmds.c @@ -290,16 +290,16 @@ static void ps_task(FAR struct tcb_s *tcb, FAR void *arg) if (ttcb->argv[1]) { nsh_output(vtbl, "%p", ttcb->argv[1]); - } - /* Then any additional arguments */ + /* Then any additional arguments */ #if CONFIG_MAX_TASK_ARGS > 2 - for (i = 2; i <= CONFIG_MAX_TASK_ARGS && ttcb->argv[i]; i++) - { - nsh_output(vtbl, ", %p", ttcb->argv[i]); - } + for (i = 2; i <= CONFIG_MAX_TASK_ARGS && ttcb->argv[i]; i++) + { + nsh_output(vtbl, ", %p", ttcb->argv[i]); + } #endif + } } nsh_output(vtbl, ")\n"); |