aboutsummaryrefslogtreecommitdiff
path: root/coreutils/expr.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-08 13:37:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-08 13:37:43 +0000
commitcd27c42552b57a517a7abbe836eea0c52a896630 (patch)
tree6ce3089a3a06284296cf079a6499da9034626539 /coreutils/expr.c
parent6c939e0cb41a366e901063ede1672434886fc9c5 (diff)
downloadbusybox-cd27c42552b57a517a7abbe836eea0c52a896630.tar.gz
chown: support -H -L -P if ENABLE_DESKTOP
chmod: cosmetic fixes expr: smallish help for dumb compilers
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)
{
if (v->type == integer)
return v->u.i == 0;
- else /* string: */
- return v->u.s[0] == '\0' || LONE_CHAR(v->u.s, '0');
+ /* string: */
+ return v->u.s[0] == '\0' || LONE_CHAR(v->u.s, '0');
}
/* Coerce V to a string value (can't fail). */
@@ -194,16 +194,16 @@ static int cmp_common(VALUE * l, VALUE * r, int op)
cmpval = l->u.i - r->u.i;
if (op == '<')
return cmpval < 0;
- else if (op == ('L' + 'E'))
+ if (op == ('L' + 'E'))
return cmpval <= 0;
- else if (op == '=')
+ if (op == '=')
return cmpval == 0;
- else if (op == '!')
+ if (op == '!')
return cmpval != 0;
- else if (op == '>')
+ if (op == '>')
return cmpval > 0;
- else /* >= */
- return cmpval >= 0;
+ /* >= */
+ return cmpval >= 0;
}
/* The arithmetic operator handling functions. */