[sheepdog] [PATCH] checkpatch.pl: report error when bzero() is found

Hitoshi Mitake h.mitake at gmail.com
Wed Nov 14 13:55:07 CET 2012


From: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>

bzero() is obsolete. This should be treated as error by checkpatch.pl.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 script/checkpatch.pl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/script/checkpatch.pl b/script/checkpatch.pl
index c3fbfde..3688131 100755
--- a/script/checkpatch.pl
+++ b/script/checkpatch.pl
@@ -3346,6 +3346,10 @@ sub process {
 			WARN("EXPORTED_WORLD_WRITABLE",
 			     "Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr);
 		}
+
+		if ($line =~ /\bbzero\(/) {
+			ERROR("BZERO", "bzero() is obsolete, use memset()");
+		}
 	}
 
 	# If we have no input at all, then there is nothing to report on
-- 
1.7.5.1




More information about the sheepdog mailing list