Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c8bd707 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1727cc70
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4188,7 +4188,7 @@ sub process {
# check for naked sscanf
# check for naked sscanf
		if ($^V && $^V ge 5.10.0 &&
		if ($^V && $^V ge 5.10.0 &&
		    defined $stat &&
		    defined $stat &&
		    $stat =~ /\bsscanf\b/ &&
		    $line =~ /\bsscanf\b/ &&
		    ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&
		    ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ &&
		     $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&
		     $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ &&
		     $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {
		     $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) {