qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 05/48] checkpatch: do not recommend qemu_strtok over


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 05/48] checkpatch: do not recommend qemu_strtok over strtok
Date: Tue, 22 Sep 2015 17:05:28 +0200

If anything it should recommend strtok_r!

Signed-off-by: Paolo Bonzini <address@hidden>
---
 scripts/checkpatch.pl | 4 ++--
 1 file 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
-- 
2.5.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]