mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
NSH set command: Eliminate useless argc check of SCRIPTS are enabled but ENVIRONMENT is disabled
This commit is contained in:
parent
169bcab331
commit
775d1052a5
1 changed files with 5 additions and 0 deletions
|
|
@ -324,9 +324,14 @@ int cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||
const char opts[] = NSH_NP_SET_OPTIONS;
|
||||
int op;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
/* Support set [{+|-}{e|x|xe|ex}] [<name> <value>] */
|
||||
|
||||
if (argc == 2 || argc == 4)
|
||||
#else
|
||||
/* Support set [{+|-}{e|x|xe|ex}] */
|
||||
|
||||
#endif
|
||||
{
|
||||
if (strlen(argv[1]) < 2)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue