lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5153BC45.807@huawei.com>
Date:	Thu, 28 Mar 2013 11:43:01 +0800
From:	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>
To:	Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] checkpatch: do not exit in main process subroutine

Currently checkpatch program exit when process empty file,
This will cause issue when @ARGV include many files ready to check.

For example, there may have Module.symvers empty file in kernel directory.

[root@...i ~]# scripts/checkpatch.pl -f kernel/*

then many file "after" empty file will not be check by script.
so disallow exit in main process subroutine.

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@...wei.com>
---
 scripts/checkpatch.pl |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b28cc38..6924733 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3634,19 +3634,19 @@ sub process {
 	# If we have no input at all, then there is nothing to report on
 	# so just keep quiet.
 	if ($#rawlines == -1) {
-		exit(0);
+		return $clean;
 	}

 	# In mailback mode only produce a report in the negative, for
 	# things that appear to be patches.
 	if ($mailback && ($clean == 1 || !$is_patch)) {
-		exit(0);
+		return $clean;
 	}

 	# This is not a patch, and we are are in 'no-patch' mode so
 	# just keep quiet.
 	if (!$chk_patch && !$is_patch) {
-		exit(0);
+		return $clean;
 	}

 	if (!$is_patch) {
-- 
1.7.9.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ