aboutsummaryrefslogtreecommitdiff
path: root/coreutils/expr.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-08 13:37:43 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-08 13:37:43 +0000
commit49399b9218031ed1e7adaad07eb351ef3b953e42 (patch)
tree6ce3089a3a06284296cf079a6499da9034626539 /coreutils/expr.c
parent0e2270ac33a9b6c87044d4d2f66945195be39907 (diff)
downloadbusybox-w32-49399b9218031ed1e7adaad07eb351ef3b953e42.tar.gz
busybox-w32-49399b9218031ed1e7adaad07eb351ef3b953e42.tar.bz2
busybox-w32-49399b9218031ed1e7adaad07eb351ef3b953e42.zip
chown: support -H -L -P if ENABLE_DESKTOP
chmod: cosmetic fixes expr: smallish help for dumb compilers git-svn-id: svn://busybox.net/trunk/busybox@18036 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r--coreutils/expr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 62d1f3a8f..b7e33de49 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -136,8 +136,8 @@ static int null(VALUE * v)
136{ 136{
137 if (v->type == integer) 137 if (v->type == integer)
138 return v->u.i == 0; 138 return v->u.i == 0;
139 else /* string: */ 139 /* string: */
140 return v->u.s[0] == '\0' || LONE_CHAR(v->u.s, '0'); 140 return v->u.s[0] == '\0' || LONE_CHAR(v->u.s, '0');
141} 141}
142 142
143/* Coerce V to a string value (can't fail). */ 143/* Coerce V to a string value (can't fail). */
@@ -194,16 +194,16 @@ static int cmp_common(VALUE * l, VALUE * r, int op)
194 cmpval = l->u.i - r->u.i; 194 cmpval = l->u.i - r->u.i;
195 if (op == '<') 195 if (op == '<')
196 return cmpval < 0; 196 return cmpval < 0;
197 else if (op == ('L' + 'E')) 197 if (op == ('L' + 'E'))
198 return cmpval <= 0; 198 return cmpval <= 0;
199 else if (op == '=') 199 if (op == '=')
200 return cmpval == 0; 200 return cmpval == 0;
201 else if (op == '!') 201 if (op == '!')
202 return cmpval != 0; 202 return cmpval != 0;
203 else if (op == '>') 203 if (op == '>')
204 return cmpval > 0; 204 return cmpval > 0;
205 else /* >= */ 205 /* >= */
206 return cmpval >= 0; 206 return cmpval >= 0;
207} 207}
208 208
209/* The arithmetic operator handling functions. */ 209/* The arithmetic operator handling functions. */