From ad4709cb6d66b6413a01110468df27c1f2533e86 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 3 Dec 2012 06:54:44 -0800 Subject: [PATCH] Small effeciency improvement - Don't check for 'bad match' until it is known that the matches are the same. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 873668961..3635b81ec 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -3432,9 +3432,9 @@ sub delete_duplicates { # There are non-duplicate rules between this rule and the base rule # for my $key ( @keys1 ) { - last RULE if $bad_match{$key}; next RULE unless $key eq $keys2[$keynum++]; next RULE unless compare_values( $baseref->{$key}, $ruleref->{$key} ); + last RULE if $bad_match{$key}; } } #