History

checkpatch: avoid sscanf test duplicated messages

Change a test of $dstat to $line to avoid possibly emitting the sscanf warning multiple times.

Joe Perches committed 12 years ago

Commit 6c8bd701 parent 1727cc71 file · +1 −1Browse files

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

Unified · Split

scripts/checkpatch.pl+1−1
@@ -4188,7 +4188,7 @@ sub process { · 4187 unmodified lines
41884188 # check for naked sscanf
41894189 if ($^V && $^V ge 5.10.0 &&
41904190 defined $stat &&
4191− $stat =~ /\bsscanf\b/ &&
4191+ $line =~ /\bsscanf\b/ &&
41924192 ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&
41934193 $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&
41944194 $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {