summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7fb73d9..918259a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5105,8 +5105,8 @@ sub process {
}
# check for single line unbalanced braces
- if ($sline =~ /.\s*\}\s*else\s*$/ ||
- $sline =~ /.\s*else\s*\{\s*$/) {
+ if ($sline =~ /^.\s*\}\s*else\s*$/ ||
+ $sline =~ /^.\s*else\s*\{\s*$/) {
CHK("BRACES", "Unbalanced braces around else statement\n" . $herecurr);
}
OpenPOWER on IntegriCloud