Skip to content

Commit 6c8bd70

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: avoid sscanf test duplicated messages
Change a test of $dstat to $line to avoid possibly emitting the sscanf warning multiple times. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1727cc7 commit 6c8bd70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/checkpatch.pl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4188,7 +4188,7 @@ sub process {
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/)) {

0 commit comments

Comments
 (0)