Only pull in new extension lines where the current contents ends with a \.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -1977,8 +1977,8 @@ sub process { · 1976 unmodified lines | |||
| 1977 | # Extract the remainder of the define (if any) and | 1977 | # Extract the remainder of the define (if any) and |
| 1978 | # rip off surrounding spaces, and trailing \'s. | 1978 | # rip off surrounding spaces, and trailing \'s. |
| 1979 | $rest = ''; | 1979 | $rest = ''; |
| 1980 | while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) { | 1980 | while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) { |
| 1981 | #print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n"; | 1981 | #print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n"; |
| 1982 | if ($off != 0 || $lines[$ln - 1] !~ /^-/) { | 1982 | if ($off != 0 || $lines[$ln - 1] !~ /^-/) { |
| 1983 | $rest .= substr($lines[$ln - 1], $off) . "\n"; | 1983 | $rest .= substr($lines[$ln - 1], $off) . "\n"; |
| 1984 | $cnt--; | 1984 | $cnt--; |