checkpatch: Fix bracing false positives on #else
PATCH 1/1 checkpatch: Fix bracing false positives on #else
Signed-off-by Jan Kiszka <[email protected]>
--- scripts/checkpatch.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/checkpatch.pl +2 -1
@@ -2536,7 +2536,8 @@ sub process { } } if (!defined $suppress_ifbraces{$linenr - 1} && - $line =~ /\b(if|while|for|else)\b/) { + $line =~ /\b(if|while|for|else)\b/ && + $line !~ /\#\s*else/) { my $allowed = 0; # Check the pre-context.
Signature · 1 line
1.7.1
Blue Swirl
AppliedThanks, applied.
Quoted 22 lines · Jan Kiszka
Signed-off-by Jan Kiszka <[email protected]>---
scripts/checkpatch.pl | 3 ++-1 files changed, 2 insertions(+), 1 deletions(-)scripts/checkpatch.pl +0
-0@@ -2536,7 +2536,8 @@ sub process { } }if (!defined $suppress_ifbraces{$linenr - 1} &&
- $line =~ /\b(if|while|for|else)\b/) { + $line =~ /\b(if|while|for|else)\b/ &&+ $line !~ /\#\s*else/) { my $allowed = 0;
# Check the pre-context.
--
1.7.1