From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 10 Nov 2009 16:21:06 +0000 (+0000)
Subject: Exit in case of unrecognized parameters.
X-Git-Tag: v_3_0_16~121
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/man-page/static/@default-cgi@edit-actions-add-url-form?a=commitdiff_plain;h=17d6f52305c582f7597774c2063c9fe0ec274d7c;p=privoxy.git

Exit in case of unrecognized parameters.
---

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index d32a838c..076f0204 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.58 2009/10/31 10:14:07 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.59 2009/11/10 16:19:38 fabiankeil Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -2268,7 +2268,7 @@ sub get_cli_options () {
         'statistics'               => \$cli_options{'statistics'},
         'version'                  => sub { VersionMessage && exit(0) },
         'help'                     => \&help,
-   );
+   ) or exit(1);
 }
 
 sub help () {
diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl
index 15e213d1..82308351 100755
--- a/tools/privoxy-regression-test.pl
+++ b/tools/privoxy-regression-test.pl
@@ -7,7 +7,7 @@
 # A regression test "framework" for Privoxy. For documentation see:
 # perldoc privoxy-regression-test.pl
 #
-# $Id: privoxy-regression-test.pl,v 1.58 2009/10/29 16:46:42 fabiankeil Exp $
+# $Id: privoxy-regression-test.pl,v 1.59 2009/10/29 16:50:32 fabiankeil Exp $
 #
 # Wish list:
 #
@@ -1497,7 +1497,7 @@ sub parse_cli_options () {
         'test-number=s'      => \$cli_options{'test-number'},
         'verbose'            => \$cli_options{'verbose'},
         'version'            => sub {print_version && exit(0)}
-    );
+    ) or exit(1);
     $log_level |= $cli_options{'debug'};
 }