From: Simon Ruderich Date: Thu, 22 Mar 2012 00:21:06 +0000 (+0100) Subject: Remove unnecessary loop. X-Git-Tag: 0.01~77 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=981d562930dc0f7eb76323571ccad3332029371a;p=blhc%2Fblhc.git Remove unnecessary loop. --- diff --git a/bin/blhc b/bin/blhc index e602106..d804ecd 100755 --- a/bin/blhc +++ b/bin/blhc @@ -451,6 +451,10 @@ while (my $line = <>) { next if $line =~ /^\s*Depends: .*?$cc_regex.*?$/ and $line !~ /\s-./; # option, prevent false negatives + # Check if additional hardening options were used. Used to ensure + # they are used for the complete build. + $harden_pie = 1 if any_flags_used($line, @cflags_pie, @ldflags_pie); + $harden_bindnow = 1 if any_flags_used($line, @ldflags_bindnow); push @input, $line; } @@ -484,13 +488,6 @@ if ($option_arch) { } } -# Check if additional hardening options were used. Used to ensure they are -# used for the complete build. -foreach my $line (@input) { - $harden_pie = 1 if any_flags_used($line, @cflags_pie, @ldflags_pie); - $harden_bindnow = 1 if any_flags_used($line, @ldflags_bindnow); -} - # Check the specified hardening options, same order as dpkg-buildflags. if ($harden_pie) { @cflags = (@cflags, @cflags_pie);