aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 01:02:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:36 -0400
commitdea33496ddc2bf1a50e9def87b4ef14709d8cb6d (patch)
treed0bd6df3188763f38a42ddc1fd562a1dd2fee0e2 /scripts/checkpatch.pl
parenta1080bf80862c571b5f0a20cb601e24dd90e2026 (diff)
checkpatch: suppress errors triggered by short patch
When the last hunk of a patch is short it will trigger errors from checkpatch: Use of uninitialized value in pattern match (m//) at /usr/local/bin/checkpatch.pl line 394. Use of uninitialized value in concatenation (.) or string at /usr/local/bin/checkpatch.pl line 397. Use of uninitialized value in pattern match (m//) Avoid touching beyond the last line. Reported by Julien Brunel. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: Julien Brunel <brunel@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 457f87460d6e..5382f7287397 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -408,6 +408,7 @@ sub ctx_statement_block {
408 # context. 408 # context.
409 if ($off >= $len) { 409 if ($off >= $len) {
410 for (; $remain > 0; $line++) { 410 for (; $remain > 0; $line++) {
411 last if (!defined $lines[$line]);
411 next if ($lines[$line] =~ /^-/); 412 next if ($lines[$line] =~ /^-/);
412 $remain--; 413 $remain--;
413 $loff = $len; 414 $loff = $len;