diff options
Diffstat (limited to 'pwx/check_tree.pl')
-rwxr-xr-x | pwx/check_tree.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pwx/check_tree.pl b/pwx/check_tree.pl index c293d6c9d..0fba81834 100755 --- a/pwx/check_tree.pl +++ b/pwx/check_tree.pl @@ -275,10 +275,6 @@ for my $file_part (@source_files) { for (my $pos = 0; $pos < $hFile{count}; ++$pos) { $hHunk = $hFile{hunks}[$pos]; ## Global shortcut - # The state of what the hunk did must be known: - $in_mask_block = $hHunk->{is_mask} && (!$hHunk->{is_endif}) ? 1 : 0; - $in_else_block = $hHunk->{is_else} && (!$hHunk->{is_endif}) ? 1 : 0; - # (pre -> early out) hunk_is_useful or next; @@ -475,8 +471,12 @@ sub build_output { $hHunk = $hFile{hunks}[$pos]; ## Global shortcut # The state of what the hunk did must be known: - $in_mask_block = $hHunk->{is_mask} && (!$hHunk->{is_endif}) ? 1 : 0; - $in_else_block = $hHunk->{is_else} && (!$hHunk->{is_endif}) ? 1 : 0; + $hHunk->{is_mask} and $in_mask_block = 1; + $hHunk->{is_else} and $in_else_block = 1; + if ($hHunk->{is_endif}) { + $in_mask_block = 0; + $in_else_block = 0; + }; # The useless are to be skipped, but we need the [e]logind[m]ask[i]nfo if ($hHunk->{useful}) { |