From: Ralf Wildenhues Date: Sun, 18 Oct 2009 10:05:43 +0000 (+0200) Subject: Simplify Variable::_check_ambiguous_condition. X-Git-Tag: ng-0.5a~460^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10091b94bbed06fddb637313f8948b0ee59032f4;p=thirdparty%2Fautomake.git Simplify Variable::_check_ambiguous_condition. * lib/Automake/Variable.pm (_check_ambiguous_condition): No need to check for $def since ambiguous_p returns an empty $message if there is no other condition which is ambiguous to $cond. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 96142b16e..de8d22efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-10-18 Ralf Wildenhues + Simplify Variable::_check_ambiguous_condition. + * lib/Automake/Variable.pm (_check_ambiguous_condition): No need + to check for $def since ambiguous_p returns an empty $message if + there is no other condition which is ambiguous to $cond. + Coverage for DisjConditions.pm. * lib/Automake/tests/DisjConditions.pl (test_basics): Increase test coverage: test ->human, ->merge, ->simplify, ->multiply. diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index f0c867f65..30dcc7972 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -469,7 +469,7 @@ sub _check_ambiguous_condition ($$$) # We allow silent variables to be overridden silently, # by either silent or non-silent variables. my $def = $self->def ($ambig_cond); - if ($message && !($def && $def->pretty == VAR_SILENT)) + if ($message && $def->pretty != VAR_SILENT) { msg 'syntax', $where, "$message ...", partial => 1; msg_var ('syntax', $var, "... `$var' previously defined here");