checkpatch: complex macros -- fix up extension handling
Only pull in new extension lines where the current contents ends with a \. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
24e1d81acd
commit
636d140a80
1 changed files with 2 additions and 2 deletions
|
@ -1977,8 +1977,8 @@ sub process {
|
||||||
# Extract the remainder of the define (if any) and
|
# Extract the remainder of the define (if any) and
|
||||||
# rip off surrounding spaces, and trailing \'s.
|
# rip off surrounding spaces, and trailing \'s.
|
||||||
$rest = '';
|
$rest = '';
|
||||||
while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) {
|
while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) {
|
||||||
#print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n";
|
#print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n";
|
||||||
if ($off != 0 || $lines[$ln - 1] !~ /^-/) {
|
if ($off != 0 || $lines[$ln - 1] !~ /^-/) {
|
||||||
$rest .= substr($lines[$ln - 1], $off) . "\n";
|
$rest .= substr($lines[$ln - 1], $off) . "\n";
|
||||||
$cnt--;
|
$cnt--;
|
||||||
|
|
Loading…
Reference in a new issue