提交 6c8bd707 编写于 作者: J Joe Perches 提交者: Linus Torvalds

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: NJoe Perches <joe@perches.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1727cc70
...@@ -4188,7 +4188,7 @@ sub process { ...@@ -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/)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册