For simplicity, let's use %m instead.

Signed-off-by: MORITA Kazutaka <morita.kazut...@lab.ntt.co.jp>
---
 script/checkpatch.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/script/checkpatch.pl b/script/checkpatch.pl
index 3ce0db8..f2b74da 100755
--- a/script/checkpatch.pl
+++ b/script/checkpatch.pl
@@ -2889,6 +2889,11 @@ sub process {
                    WARN("NEWLINE_IN_SDPRINTF",
                         "'\\n' is not required for $1 format string\n" . 
$herecurr);
                }
+# check for strerror(errno)
+               if ($line =~ /\bstrerror\(errno\)/) {
+                   WARN("STRERROR",
+                        "use %m instead of strerror(errno)\n" . $herecurr);
+               }
        }
 
        # If we have no input at all, then there is nothing to report on
-- 
1.8.1.3.566.gaa39828

-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to