]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Simplify compile_flag_regexp().
authorSimon Ruderich <simon@ruderich.org>
Wed, 14 Aug 2013 13:17:08 +0000 (15:17 +0200)
committerSimon Ruderich <simon@ruderich.org>
Wed, 14 Aug 2013 13:17:08 +0000 (15:17 +0200)
bin/blhc

index cfe49d2a3335527a1dcca61fbe80ff264b4640b5..3abb9791e189b0e3f43139de7d0182218469414d 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -517,14 +517,12 @@ sub compile_flag_regexp {
 sub extension_found {
     my ($extensions_ref, @extensions) = @_;
 
-    my $found = 0;
     foreach my $extension (@extensions) {
         if (exists $extensions_ref->{$extension}) {
-            $found = 1;
-            last;
+            return 1;
         }
     }
-    return $found;
+    return 0;
 }