Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 636d140a authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds
Browse files

checkpatch: complex macros -- fix up extension handling



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

Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 24e1d81a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1977,8 +1977,8 @@ sub process {
			# Extract the remainder of the define (if any) and
			# rip off surrounding spaces, and trailing \'s.
			$rest = '';
			while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) {
				#print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n";
			while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) {
				#print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n";
				if ($off != 0 || $lines[$ln - 1] !~ /^-/) {
					$rest .= substr($lines[$ln - 1], $off) . "\n";
					$cnt--;