[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1387335412-8694-1-git-send-email-jtheou@adeneo-embedded.us>
Date: Tue, 17 Dec 2013 18:56:52 -0800
From: Jean-Baptiste Theou <jtheou@...neo-embedded.us>
To: <linux-kernel@...r.kernel.org>
CC: <joe@...ches.com>, Jean-Baptiste Theou <jtheou@...neo-embedded.us>
Subject: [PATCH] checkpatch.pl: Fix wrong curly bracket position reporting
This patch fixes wrong curly bracket position reporting when function
declarations have only one void argument.
Missing error (ERROR: space required before the open brace '{') on this
situation :
int foo(void){
...
}
Signed-off-by: Jean-Baptiste Theou <jtheou@...neo-embedded.us>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8f3aecd..3a18c5e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3159,7 +3159,7 @@ sub process {
## }
#need space before brace following if, while, etc
- if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
+ if (($line =~ /\(.*\){/ && ($line =~ /\(void\){/ || $line !~ /\($Type\){/)) ||
$line =~ /do{/) {
if (ERROR("SPACING",
"space required before the open brace '{'\n" . $herecurr) &&
--
1.8.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists