summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-03 14:49:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 16:21:13 -0700
commit6c8bd7076d79687183126fa7ffaa700fc2007d81 (patch)
tree167ec6aaf5093374c0ad7e1cf08e059aaeae1852 /scripts
parent1727cc70451017e6d9c0129681792c18f166af75 (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9f12213d81cf..e7c50977fe3d 100755
--- a/scripts/checkpatch.pl
+++ b/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/)) {