mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
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>
This commit is contained in:
parent
a1080bf808
commit
dea33496dd
1 changed files with 1 additions and 0 deletions
|
@ -408,6 +408,7 @@ sub ctx_statement_block {
|
|||
# context.
|
||||
if ($off >= $len) {
|
||||
for (; $remain > 0; $line++) {
|
||||
last if (!defined $lines[$line]);
|
||||
next if ($lines[$line] =~ /^-/);
|
||||
$remain--;
|
||||
$loff = $len;
|
||||
|
|
Loading…
Reference in a new issue