Improve optimize level 16 fix.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-11-26 15:11:07 -08:00
parent a4dcd1071a
commit 85a46690c0

View File

@ -3380,11 +3380,15 @@ sub delete_duplicates {
my $rulenum = @_;
my $duplicate = 0;
if ( $baseref->{mode} == CAT_MODE ) {
{
RULE:
while ( --$rulenum >= 0 ) {
$ruleref = $_[$rulenum];
last unless $ruleref->{mode} == CAT_MODE;
my @keys2 = sort(keys( %$ruleref ) );
next unless @keys1 == @keys2 ;
@ -3396,7 +3400,9 @@ sub delete_duplicates {
next RULE unless compare_values( $baseref->{$key}, $ruleref->{$key} );
}
$duplicate = $ruleref->{mode} == CAT_MODE;;
$duplicate = 1;
}
}
}
if ( $duplicate ) {