summaryrefslogtreecommitdiff
path: root/coreutils/expr.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-21 13:23:14 +0000
committerDenis Vlasenko2006-12-21 13:23:14 +0000
commitbf66fbc8e2380717c1fab860cfc60c78582839dd (patch)
tree3ab3dd4df901851ff7f4345708592118766ba4aa /coreutils/expr.c
parent6910741067913d131d931b1e6424d3b8ed43e64f (diff)
downloadbusybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.zip
busybox-bf66fbc8e2380717c1fab860cfc60c78582839dd.tar.gz
introduce LONE_CHAR (optimized strcmp with one-char string)
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r--coreutils/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 1914734..51e553d 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -136,7 +136,7 @@ static int null(VALUE * v)
if (v->type == integer)
return v->u.i == 0;
else /* string: */
- return v->u.s[0] == '\0' || strcmp(v->u.s, "0") == 0;
+ return v->u.s[0] == '\0' || LONE_CHAR(v->u.s, '0');
}
/* Coerce V to a string value (can't fail). */