From: Ralf Wildenhues Date: Sun, 16 Nov 2008 22:00:22 +0000 (+0100) Subject: Simplify, avoid unbalanced parentheses from last change. X-Git-Tag: v2.63b~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde7ee974a05b89d0a34b6492ea19cdbfc36b713;p=thirdparty%2Fautoconf.git Simplify, avoid unbalanced parentheses from last change. * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid unbalanced parentheses from last change. Spotted by Eric Blake, fix suggested by Paolo Bonzini. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 7a8502d8e..cdce7ec2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-11-16 Ralf Wildenhues + * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid + unbalanced parentheses from last change. + Spotted by Eric Blake, fix suggested by Paolo Bonzini. + Fix exit status of expr version of as_func_arith. * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Count an exit status of 1 of expr also as success, to avoid failure if the diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 56697ad5c..2c592c612 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -1742,8 +1742,7 @@ AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])], }'], [as_func_arith () { - as_val=`expr "$[]@"` - case $? in 0|1) :;; *) false;; esac + as_val=`expr "$[]@" || test $? -eq 1` }]) # as_func_arith ])