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 ea22d79aeb
commit 34c788d67d

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;
}