aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-09-16 18:35:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-25 12:04:41 +0200
commit5e43efb29ae877da131e6c1a4761cd7f4eec5a16 (patch)
treede7e8f1fe58b7310c09d4a6d97c466ec257c13cf
parentfe8545386726a2b1f8af409bcd5ea3d33218af54 (diff)
downloadqemu-5e43efb29ae877da131e6c1a4761cd7f4eec5a16.zip
qemu-5e43efb29ae877da131e6c1a4761cd7f4eec5a16.tar.gz
qemu-5e43efb29ae877da131e6c1a4761cd7f4eec5a16.tar.bz2
checkpatch: do not recommend qemu_strtok over strtok
If anything it should recommend strtok_r! Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 574334b..b6d71ea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2463,8 +2463,8 @@ sub process {
WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
}
-# recommend qemu_strto* over strto*
- if ($line =~ /\b(strto.*?)\s*\(/) {
+# recommend qemu_strto* over strto* for numeric conversions
+ if ($line =~ /\b(strto[^k].*?)\s*\(/) {
WARN("consider using qemu_$1 in preference to $1\n" . $herecurr);
}
# check for module_init(), use category-specific init macros explicitly please