mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-14 00:43:14 +00:00
Fix NSH PS command: If there are not argument, it would print garbage for argument list
This commit is contained in:
parent
dd8d40dabd
commit
00545910f0
1 changed files with 6 additions and 6 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue