]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Simplify Variable::_check_ambiguous_condition.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 18 Oct 2009 10:05:43 +0000 (12:05 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 18 Oct 2009 15:37:36 +0000 (17:37 +0200)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
lib/Automake/Variable.pm

index 96142b16e2f147b6879ed75d8655494dcf0d2936..de8d22efb0e344e75bba37eef0dd7db23cf38014 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-10-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       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.
index f0c867f6518b9f8487c55655bb0cdf744936b188..30dcc79722c8ef96679d80551251d084c96769d6 100644 (file)
@@ -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");