From 32ba2ce0b9eee5865237a2290d37195788577fe0 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 26 Jul 2007 14:23:11 +0000 Subject: [PATCH] Tiny optimization git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6964 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index d0aef6c84..1460f1f7d 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -835,8 +835,6 @@ sub read_a_line() { while ( <$currentfile> ) { - $currentlinenumber++; - chomp; # # Continuation @@ -850,11 +848,13 @@ sub read_a_line() { # Ignore ( concatenated ) Blank Lines # $currentline = '', next if $currentline =~ /^\s*$/; + + $currentlinenumber = $.; # # Expand Shell Variables using %ENV # # $1 $2 $3 - $4 - while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$)x ) { + while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) { my $val = $ENV{$3}; $val = '' unless defined $val; $currentline = join( '', $1 , $val , $4 );