mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-20 21:30:44 +01:00
Simplify push_action_params()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
ea22d79aeb
commit
34c788d67d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user