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
4188# check for naked sscanf4188# check for naked sscanf
4189 if ($^V && $^V ge 5.10.0 &&4189 if ($^V && $^V ge 5.10.0 &&
4190 defined $stat &&4190 defined $stat &&
4191 $stat =~ /\bsscanf\b/ &&4191 $line =~ /\bsscanf\b/ &&
4192 ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&4192 ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&
4193 $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&4193 $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&
4194 $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {4194 $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {