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

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

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));