From 10091b94bbed06fddb637313f8948b0ee59032f4 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 18 Oct 2009 12:05:43 +0200 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ lib/Automake/Variable.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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"); -- 2.47.2