Ensure we terminate when there are no futher continuation lines when trying to determine relative indent of conditionals and their blocks.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -1547,8 +1547,9 @@ sub process { · 1546 unmodified lines | ||
| 1547 | 1547 | $s =~ /^\s*#\s*?/ || |
| 1548 | 1548 | $s =~ /^\s*$Ident\s*:/) { |
| 1549 | 1549 | $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0; |
| 1550 | − $s =~ s/^.*?\n//; | |
| 1551 | − $cond_lines++; | |
| 1550 | + if ($s =~ s/^.*?\n//) { | |
| 1551 | + $cond_lines++; | |
| 1552 | + } | |
| 1552 | 1553 | } |
| 1553 | 1554 | } |
| 1554 | 1555 | |