summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-03 23:49:16 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 01:21:13 +0200
commit6c8bd7076d79687183126fa7ffaa700fc2007d81 (patch)
tree167ec6aaf5093374c0ad7e1cf08e059aaeae1852 /scripts/checkpatch.pl
parentcheckpatch: update octal permissions warning (diff)
downloadlinux-6c8bd7076d79687183126fa7ffaa700fc2007d81.tar.xz
linux-6c8bd7076d79687183126fa7ffaa700fc2007d81.zip
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/checkpatch.pl')
-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/)) {