check-code: fix return code initialization
authorMads Kiilerich <mads@kiilerich.com>
Tue, 22 Nov 2011 01:37:26 +0100
changeset 15544 53ef627cda30
parent 15543 49a5db5b10de
child 15545 2607de602105
check-code: fix return code initialization Don't crash when nothing is tested, but return failure when other files than the last one fails.
contrib/check-code.py
--- a/contrib/check-code.py	Mon Nov 21 13:11:17 2011 -0600
+++ b/contrib/check-code.py	Tue Nov 22 01:37:26 2011 +0100
@@ -420,8 +420,8 @@
     else:
         check = args
 
+    ret = 0
     for f in check:
-        ret = 0
         if not checkfile(f, maxerr=options.per_file, warnings=options.warnings,
                          blame=options.blame, debug=options.debug,
                          lineno=options.lineno):