aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-12 13:21:08 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-06-12 13:21:08 +0000
commitfdcbc4e7095c225a8586dcb96a7a99c2d1007aeb (patch)
tree3efb7e78fe09f6c45850f124c3857a2b06b94ba3
parent15611bb95815de14bcb35f66bd10089a322ea30b (diff)
downloadbusybox-w32-fdcbc4e7095c225a8586dcb96a7a99c2d1007aeb.tar.gz
busybox-w32-fdcbc4e7095c225a8586dcb96a7a99c2d1007aeb.tar.bz2
busybox-w32-fdcbc4e7095c225a8586dcb96a7a99c2d1007aeb.zip
- fix testing primary expressions like '"-u" = "-u"'
-rw-r--r--coreutils/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 92f94b414..bbbfce58e 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -224,7 +224,7 @@ int bb_test(int argc, char **argv)
224 if (argc == 2) 224 if (argc == 2)
225 return *argv[1] == '\0'; 225 return *argv[1] == '\0';
226//assert(argc); 226//assert(argc);
227 if (LONE_CHAR(argv[1], '!')) { 227 {
228 bool _off; 228 bool _off;
229 if (argc == 3) 229 if (argc == 3)
230 return *argv[2] != '\0'; 230 return *argv[2] != '\0';
@@ -232,7 +232,7 @@ int bb_test(int argc, char **argv)
232 t_lex(argv[2 + _off]); 232 t_lex(argv[2 + _off]);
233 if (t_wp_op && t_wp_op->op_type == BINOP) { 233 if (t_wp_op && t_wp_op->op_type == BINOP) {
234 t_wp = &argv[1 + _off]; 234 t_wp = &argv[1 + _off];
235 return binop() == 1; 235 return binop() == (LONE_CHAR(argv[1], '!'));
236 } 236 }
237 } 237 }
238 t_wp = &argv[1]; 238 t_wp = &argv[1];