Simplify push_action_params()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-07-01 15:38:39 -07:00
parent 981c9a9047
commit 89ee25dde2

View File

@ -1803,14 +1803,11 @@ sub embedded_perl( $ ) {
sub push_action_params( $ ) {
my @params = split /,/, $_[0];
my $oldparams = \@actparms;
my $params = @params;
@actparms = ();
for ( my $i = 1; $i <= @params; $i++ ) {
my $val = $params[$i - 1];
$actparms[$i] = $val eq '-' ? '' : $val eq '--' ? '-' : $val;
}
@actparms[1..$params] = @params;
$oldparams;
}