diff options
author | Joe Perches <joe@perches.com> | 2014-04-03 17:49:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:13 -0400 |
commit | 6c8bd7076d79687183126fa7ffaa700fc2007d81 (patch) | |
tree | 167ec6aaf5093374c0ad7e1cf08e059aaeae1852 /scripts/checkpatch.pl | |
parent | 1727cc70451017e6d9c0129681792c18f166af75 (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/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
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 { | |||
4188 | # check for naked sscanf | 4188 | # check for naked sscanf |
4189 | if ($^V && $^V ge 5.10.0 && | 4189 | if ($^V && $^V ge 5.10.0 && |
4190 | defined $stat && | 4190 | defined $stat && |
4191 | $stat =~ /\bsscanf\b/ && | 4191 | $line =~ /\bsscanf\b/ && |
4192 | ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ && | 4192 | ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ && |
4193 | $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ && | 4193 | $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ && |
4194 | $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) { | 4194 | $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) { |