According to Eric Blake on 2/18/2010 7:18 AM: > According to jida...@jidanni.org on 2/18/2010 6:54 AM: >> EB> jidanni, it would be a two-line patch to expr.c. Would you care to write >> EB> such a patch, rather than just complaining? >> >> It would be much more efficient for me to just play the role of the bug >> reporter here.... trust me. Thanks. > > You are giving up too easily. Your bug reports would go a LOT further if > you would show some effort behind them.
Your suggestion wasn't all that bad, but I still stand by my position that you should do more work than just complain. But I had some time available while cleaning out my inbox, and I was feeling generous, so I finished the work and am pushing this: -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
From 628a62aaaa991a70c7b28aa11f35f0df0379031d Mon Sep 17 00:00:00 2001 From: Eric Blake <ebl...@redhat.com> Date: Thu, 25 Feb 2010 08:36:39 -0700 Subject: [PATCH] expr: clarify error message * src/expr.c (eval4, eval3): Clarify that expr expects integers, and not the broader category of numbers. Suggested by Dan Jacobson. --- src/expr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/expr.c b/src/expr.c index 048c596..1ebb4b9 100644 --- a/src/expr.c +++ b/src/expr.c @@ -787,7 +787,7 @@ eval4 (bool evaluate) if (evaluate) { if (!toarith (l) || !toarith (r)) - error (EXPR_INVALID, 0, _("non-numeric argument")); + error (EXPR_INVALID, 0, _("non-integer argument")); if (fxn != multiply && mpz_sgn (r->u.i) == 0) error (EXPR_INVALID, 0, _("division by zero")); ((fxn == multiply ? mpz_mul @@ -824,7 +824,7 @@ eval3 (bool evaluate) if (evaluate) { if (!toarith (l) || !toarith (r)) - error (EXPR_INVALID, 0, _("non-numeric argument")); + error (EXPR_INVALID, 0, _("non-integer argument")); (fxn == plus ? mpz_add : mpz_sub) (l->u.i, l->u.i, r->u.i); } freev (r); -- 1.6.6.1
signature.asc
Description: OpenPGP digital signature