[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error of externs c
From: |
Jiang Biao |
Subject: |
[Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error of externs checking. |
Date: |
Tue, 10 Oct 2017 15:54:19 +0800 |
When adding a function declaration in a .c file without extern
keywork decoration, checkpatch.pl will report *externs should be
avoided in .c files* false error. This patch fixes the bug.
Signed-off-by: Jiang Biao <address@hidden>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3c0a28e..c12bc4c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2534,7 +2534,7 @@ sub process {
# check for new externs in .c files.
if ($realfile =~ /\.c$/ && defined $stat &&
- $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s)
+ $stat =~ /^.\s*(?:extern\s+)$Type\s+($Ident)(\s*)\(/s)
{
my $function_name = $1;
my $paren_space = $2;
--
2.7.4
- [Qemu-devel] [PATCH] scripts/checkpatch.pl: fix false error of externs checking.,
Jiang Biao <=