diff options
Diffstat (limited to 'apps/nshlib/nsh_parse.c')
-rw-r--r-- | apps/nshlib/nsh_parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index 4ac6980df..c7ef521a1 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -1216,12 +1216,12 @@ static FAR char *nsh_argument(FAR struct nsh_vtbl_s *vtbl, FAR char **saveptr, if (*(pbegin + 1) == '>') { *saveptr = pbegin + 2; - pbegin = (char*)g_redirect2; + argument = (FAR char *)g_redirect2; } else { *saveptr = pbegin + 1; - pbegin = (char*)g_redirect1; + argument = (FAR char *)g_redirect1; } } @@ -1232,7 +1232,7 @@ static FAR char *nsh_argument(FAR struct nsh_vtbl_s *vtbl, FAR char **saveptr, /* Return NULL meaning that we are at the end of the line */ *saveptr = pbegin; - pbegin = NULL; + argument = NULL; } /* Otherwise, it is a normal argument and we have to parse using the normal |