Correct optimization from 4.3.6

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9581 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2009-03-03 04:07:33 +00:00
parent f0ff364a6f
commit fe7a5e5a3f
2 changed files with 12 additions and 24 deletions

View File

@ -612,7 +612,7 @@ sub purge_jump ( $$ ) {
my $to = $toref->{name};
for ( @{$fromref->{rules}} ) {
$_ = undef, last if / -j ${to}\b/;
$_ = undef if / -j ${to}\b/;
}
$toref->{referenced} = 0 unless @{$toref->{rules}};

View File

@ -921,27 +921,18 @@ sub compiler {
# I N I T I A L I Z E
# (Writes the initialize() function to the compiled script)
#
unless ( $command eq 'check' ) {
enable_object;
unless ( $command eq 'check' ) {
generate_script_1;
disable_object;
}
#
# S T O P _ F I R E W A L L
# (Writes the stop_firewall() function to the compiled script)
#
unless ( $command eq 'check' ) {
enable_object;
compile_stop_firewall;
disable_object;
}
#
# C O M M O N _ R U L E S
# (Writes the setup_common_rules() function to the compiled script)
#
enable_object;
unless ( $command eq 'check' ) {
unless ( $test ) {
if ( $family == F_IPV4 ) {
copy $globals{SHAREDIRPL} . 'prog.functions';
@ -986,13 +977,10 @@ sub compiler {
emit '}';
}
disable_object;
#
# R O U T I N G _ A N D _ T R A F F I C _ S H A P I N G
# (Writes the setup_routing_and_traffic_shaping() function to the compiled script)
#
enable_object;
unless ( $command eq 'check' ) {
emit( "\n#",
'# Setup routing and traffic shaping',