History

checkpatch: complex macros -- fix up extension handling

Only pull in new extension lines where the current contents ends with a \.

Andy Whitcroft committed 18 years ago

Commit 636d1401 parent 24e1d811 file · +2 −2Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+2−2
@@ -1977,8 +1977,8 @@ sub process { · 1976 unmodified lines
19771977 # Extract the remainder of the define (if any) and
19781978 # rip off surrounding spaces, and trailing \'s.
19791979 $rest = '';
1980− while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) {
1981− #print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n";
1980+ while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) {
1981+ #print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n";
19821982 if ($off != 0 || $lines[$ln - 1] !~ /^-/) {
19831983 $rest .= substr($lines[$ln - 1], $off) . "\n";
19841984 $cnt--;