diff options
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/examples/nsh/nsh_test.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/nuttx/examples/nsh/nsh_test.c b/nuttx/examples/nsh/nsh_test.c index a767a3ac4..400bfe43c 100644 --- a/nuttx/examples/nsh/nsh_test.c +++ b/nuttx/examples/nsh/nsh_test.c @@ -315,7 +315,6 @@ static inline int unaryexpression(FAR struct nsh_vtbl_s *vtbl, char **argv) static int expression(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { int value; - boolean valid; int i = 0; /* Check for unary operations on expressions */ @@ -368,11 +367,7 @@ static int expression(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (strcmp(argv[i], "-a") == 0) { - if (!valid) - { - goto errout_syntax; - } - else if (value != TEST_TRUE) + if (value != TEST_TRUE) { return TEST_FALSE; } @@ -387,11 +382,7 @@ static int expression(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) else if (strcmp(argv[i], "-o") == 0) { - if (!valid) - { - goto errout_syntax; - } - else if (value == TEST_TRUE) + if (value == TEST_TRUE) { return TEST_TRUE; } |