diff options
-rw-r--r-- | src/expr.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/expr.c b/src/expr.c index 98f8ee49b..6222939d0 100644 --- a/src/expr.c +++ b/src/expr.c @@ -283,14 +283,6 @@ null (VALUE *v) } } -/* Return nonzero if V is a string value. */ - -static int -isstring (VALUE *v) -{ - return v->type == string; -} - /* Coerce V to a string value (can't fail). */ static void @@ -699,16 +691,11 @@ eval2 (void) return l; args++; r = eval3 (); - toarith (l); - toarith (r); - if (isstring (l) || isstring (r)) - { - tostring (l); - tostring (r); - lval = strcoll (l->u.s, r->u.s); - rval = 0; - } - else + tostring (l); + tostring (r); + lval = strcoll (l->u.s, r->u.s); + rval = 0; + if (toarith (l) && toarith (r)) { lval = l->u.i; rval = r->u.i; |