NSH set command: Eliminate useless argc check of SCRIPTS are enabled but ENVIRONMENT is disabled

This commit is contained in:
Gregory Nutt 2017-04-09 12:03:18 -06:00
parent 169bcab331
commit 775d1052a5

View File

@ -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)
{