From cb96ed22d2d46c34a1a06fea374eeb0c6cf0269b Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 14 Aug 2013 15:17:08 +0200 Subject: [PATCH] Simplify compile_flag_regexp(). --- bin/blhc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/blhc b/bin/blhc index cfe49d2..3abb979 100755 --- 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; } -- 2.45.2