X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tools%2Fscripts%2Fcheckpatch.pl;fp=tools%2Fscripts%2Fcheckpatch.pl;h=92befc6f8f6c19c667b8343ee9fb539f701ae091;hb=18a6fdc154ed61c641e2238c0f0ea6af0331c248;hp=4eb50c3cb0a9e50bc4f7f07a7d42ac30f9258bd9;hpb=a8d302f9abe6bbb5daceafaeae7cdb1804d14d59;p=fw%2Fopenocd diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 4eb50c3cb..92befc6f8 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -2225,7 +2225,7 @@ sub process { # function brace can't be on same line, except for #defines of do while, # or if closed on same line if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and - !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) { + !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) { ERROR("OPEN_BRACE", "open brace '{' following function declarations go on the next line\n" . $herecurr); } @@ -2493,8 +2493,8 @@ sub process { ## } #need space before brace following if, while, etc - if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || - $line =~ /do{/) { + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) || + $line =~ /do\{/) { ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr); }