summaryrefslogtreecommitdiff
path: root/tools/checkfiltername.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/checkfiltername.pl')
-rwxr-xr-xtools/checkfiltername.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/checkfiltername.pl b/tools/checkfiltername.pl
index 6f8a0f2bd4..8256945910 100755
--- a/tools/checkfiltername.pl
+++ b/tools/checkfiltername.pl
@@ -104,8 +104,6 @@ my $showall = 0;
my $comment = 0;
-my $error = 0;
-
sub checkprotoabbrev {
my $abbrev = "";
my $abbrevpos;
@@ -695,7 +693,10 @@ while (<>) {
&printprevfile();
-print "\n\nTOTAL ERRORS: $totalerrorcount";
+if ($totalerrorcount > 0) {
+ print "\n\nTOTAL ERRORS: $totalerrorcount";
+}
+
if ($filecount > 1) {
print " ($errorfilecount files)\n";
@@ -742,6 +743,6 @@ if ($filecount > 1) {
print "\n";
-exit $error;
+exit (($totalerrorcount == 0) ? 0 : 1); # exit 1 if ERROR
__END__