History

checkpatch: fix unescaped left brace

There is an unescaped left brace in a regex in OPEN_BRACE check. This throws a runtime error when checkpatch is run with --fix flag and the OPEN_BRACE check is executed. Fix it by escaping the left brace.

Dwaipayan Ray committed 5 years ago

Commit 03f49351 parent 27b379a1 file · +1 −1Browse files

Unified · Split

scripts/checkpatch.pl+1−1
@@ -4505,7 +4505,7 @@ sub process { · 4504 unmodified lines
45054505 $fix) {
45064506 fix_delete_line($fixlinenr, $rawline);
45074507 my $fixed_line = $rawline;
4508− $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/;
4508+ $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*)\{(.*)$/;
45094509 my $line1 = $1;
45104510 my $line2 = $2;
45114511 fix_insert_line($fixlinenr, ltrim($line1));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t