mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 21:41:18 +08:00
NSH set command: Eliminate useless argc check of SCRIPTS are enabled but ENVIRONMENT is disabled
This commit is contained in:
@@ -324,9 +324,14 @@ int cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
const char opts[] = NSH_NP_SET_OPTIONS;
|
const char opts[] = NSH_NP_SET_OPTIONS;
|
||||||
int op;
|
int op;
|
||||||
|
|
||||||
|
#ifndef CONFIG_DISABLE_ENVIRON
|
||||||
/* Support set [{+|-}{e|x|xe|ex}] [<name> <value>] */
|
/* Support set [{+|-}{e|x|xe|ex}] [<name> <value>] */
|
||||||
|
|
||||||
if (argc == 2 || argc == 4)
|
if (argc == 2 || argc == 4)
|
||||||
|
#else
|
||||||
|
/* Support set [{+|-}{e|x|xe|ex}] */
|
||||||
|
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (strlen(argv[1]) < 2)
|
if (strlen(argv[1]) < 2)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user