]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Add missing //o to regex
authorSimon Ruderich <simon@ruderich.org>
Sun, 20 May 2018 10:47:00 +0000 (12:47 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 20 May 2018 11:01:20 +0000 (13:01 +0200)
//o is a performance optimization which tells Perl to never recompile
the regex (per default it's recompiled if any used variable changes).
//o might not be necessary in recent Perl versions but in the past this
check had a measurable performance impact.

So add it for consistency and because we actually never change the
variable.

bin/blhc

index c2a9d98f9b802494c49b9760f27f3afb6c476b29..193297e4b7fdba4ffb6095074b4c3cea0774e055 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -1073,7 +1073,7 @@ foreach my $file (@ARGV) {
             # treated as a normal compiler line.
             next if $line =~ m{^\s*rm\s+};
             # Some build systems emit "gcc > file".
             # treated as a normal compiler line.
             next if $line =~ m{^\s*rm\s+};
             # Some build systems emit "gcc > file".
-            next if $line =~ m{$cc_regex_normal\s*>\s*\S+};
+            next if $line =~ m{$cc_regex_normal\s*>\s*\S+}o;
 
             # Check if additional hardening options were used. Used to ensure
             # they are used for the complete build.
 
             # Check if additional hardening options were used. Used to ensure
             # they are used for the complete build.