cleanup: simplify subroutine '&saw_extension'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 7 Jun 2012 17:14:30 +0000 (19:14 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 8 Jun 2012 20:01:54 +0000 (22:01 +0200)
* automake.in (saw_extension): Now that we use the '%extension_seen'
hash only as a set (it's keys being its elements), we can simplify
the implementation of this function accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index a87597b..f88d94d 100644 (file)
@@ -6028,14 +6028,7 @@ sub resolve_linker
 sub saw_extension
 {
     my ($ext) = @_;
-    if (! defined $extension_seen{$ext})
-    {
-       $extension_seen{$ext} = 1;
-    }
-    else
-    {
-       ++$extension_seen{$ext};
-    }
+    $extension_seen{$ext} = 1;
 }
 
 # register_language (%ATTRIBUTE)