Fix incorrect argument count error message

The `too many arguments` and `missing required argument(s)` messages
should be switched in order for the correct message to be shown to the
user.
This commit is contained in:
Norman Rasmussen
2021-12-31 01:58:04 -08:00
committed by Xiang Xiao
parent d1bcd2977c
commit 41ce7d40f6
3 changed files with 4 additions and 4 deletions

View File

@@ -308,7 +308,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc,
{
sdata = argv[optind];
}
else if (optind >= argc)
else if (optind < argc)
{
fmt = g_fmttoomanyargs;
goto errout;