Skip to content

Commit 3005868

Browse files
authored
Merge pull request FRRouting#20111 from hedrok/tools-checkpatch-fix-constant-comparison-check
tools: fix checkpatch.pl for 'FOO < BAR && ...'
2 parents 67660e0 + fc53f1a commit 3005868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5542,7 +5542,7 @@ sub process {
55425542
my $to = $4;
55435543
my $newcomp = $comp;
55445544
if ($lead !~ /(?:$Operators|\.)\s*$/ &&
5545-
$to !~ /^(?:Constant|[A-Z_][A-Z0-9_]*)$/ &&
5545+
$to !~ /^(?:Constant|[A-Z_][A-Z0-9_]*)\s*$/ &&
55465546
WARN("CONSTANT_COMPARISON",
55475547
"Comparisons should place the constant on the right side of the test\n" . $herecurr) &&
55485548
$fix) {

0 commit comments

Comments
 (0)