lkml.org 
[lkml]   [2008]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] update checkpatch.pl to version 0.19
>       return is not a function

Bah, no matter how much testing you do something always slips through.
This one is false triggering enough to warrent a fix.

Andrew, please suck this one up on top.

-apw

=== 8< ===
return is not a function -- tighten test

Tighten the return is not a function test so that we only report it on
the line it occurs.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>

---
diff --git a/checkpatch.pl b/checkpatch.pl
index cc9cd7c..66f060e 100755
--- a/checkpatch.pl
+++ b/checkpatch.pl
@@ -1665,7 +1665,7 @@ sub process {
}

# Return is not a function.
- if (defined($stat) && $stat =~ /\breturn(\s*)(\(.*);/s) {
+ if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) {
my $spacing = $1;
my $value = $2;



\
 
 \ /
  Last update: 2008-05-01 14:13    [W:0.036 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site