Эх сурвалжийг харах

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>
Joe Perches 11 жил өмнө
parent
commit
6c8bd7076d
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      scripts/checkpatch.pl

+ 1 - 1
scripts/checkpatch.pl

@@ -4188,7 +4188,7 @@ sub process {
 # check for naked sscanf
 		if ($^V && $^V ge 5.10.0 &&
 		    defined $stat &&
-		    $stat =~ /\bsscanf\b/ &&
+		    $line =~ /\bsscanf\b/ &&
 		    ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&
 		     $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&
 		     $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {