Rename add_quotes to join_parts

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-12-15 16:12:03 -08:00
parent 3fbe3aad09
commit 2869a9a94d

View File

@ -1990,7 +1990,7 @@ sub directive_warning( $$$ ) {
# Add quotes to the passed value if the passed 'first part' has an odd number of quotes # Add quotes to the passed value if the passed 'first part' has an odd number of quotes
# Return an expression that concatenates $first, $val and $rest # Return an expression that concatenates $first, $val and $rest
# #
sub add_quotes( $$$ ) { sub join_parts( $$$ ) {
my ( $first, $val, $rest ) = @_; my ( $first, $val, $rest ) = @_;
$val = '' unless defined $val; $val = '' unless defined $val;
@ -2020,7 +2020,7 @@ sub evaluate_expression( $$$ ) {
exists $capdesc{$var} ? have_capability( $var ) : '' ); exists $capdesc{$var} ? have_capability( $var ) : '' );
} }
$expression = add_quotes( $first, $val, $rest ); $expression = join_parts( $first, $val, $rest );
directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100; directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100;
} }
@ -2029,7 +2029,7 @@ sub evaluate_expression( $$$ ) {
while ( $expression =~ m( ^(.*?) \@({)? (\d+|[a-zA-Z]\w*) (?(2)}) (.*)$ )x ) { while ( $expression =~ m( ^(.*?) \@({)? (\d+|[a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
my ( $first, $var, $rest ) = ( $1, $3, $4); my ( $first, $var, $rest ) = ( $1, $3, $4);
$val = $var ? $actparms{$var} : $chain; $val = $var ? $actparms{$var} : $chain;
$expression = add_quotes( $first, $val, $rest ); $expression = join_parts( $first, $val, $rest );
directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100; directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100;
} }
} }