OSDN Git Service

checkpatch: do not recommend qemu_strtok over strtok
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 16 Sep 2015 16:35:09 +0000 (18:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Sep 2015 10:04:41 +0000 (12:04 +0200)
If anything it should recommend strtok_r!

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl

index 574334b..b6d71ea 100755 (executable)
@@ -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