klibc-bot for Herbert Xu
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] builtin: Reset t_wp_op in testcmd
Commit-ID: fc07f81df67f5071bbefdcdab490c615cd3d6c6d Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=fc07f81df67f5071bbefdcdab490c615cd3d6c6d Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Mon, 13 Jul 2015 14:06:35 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] builtin: Reset t_wp_op in testcmd The global variable t_wp_op needs to be reset every time testcmd is called or it may cause incorrect parsing of the arguments. Reported-by: Martijn Dekker <martijn at inlv.org> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/bltin/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c index bab9a1f9..58c05fec 100644 --- a/usr/dash/bltin/test.c +++ b/usr/dash/bltin/test.c @@ -193,6 +193,8 @@ testcmd(int argc, char **argv) argv[argc] = NULL; } + t_wp_op = NULL; + recheck: argv++; argc--;
Apparently Analagous Threads
- [klibc:update-dash] dash: builtin: Reset t_wp_op in testcmd
- [klibc:update-dash] builtin: Greater resolution in test -nt / test -ot
- [klibc:update-dash] dash: builtin: Greater resolution in test -nt / test -ot
- [klibc:update-dash] [BUILTIN] Correctly handle test ! ! = !
- [klibc:update-dash] dash: [BUILTIN] Correctly handle test ! ! = !