diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-18 20:50:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-18 20:50:48 +0000 |
commit | 28275fce0361a2b721951131ef4a07f0ac0d22af (patch) | |
tree | 3c7e9bf13f434a673cde997d98b8683ff5e45658 /dhcp_wizard | |
parent | b9626dc4aaf5dfce1b8cf01dee5facb4b5791df8 (diff) | |
download | drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.gz drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.bz2 drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.xz drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.zip |
simplify
Diffstat (limited to 'dhcp_wizard')
-rwxr-xr-x | dhcp_wizard/Dhcp.pm | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/dhcp_wizard/Dhcp.pm b/dhcp_wizard/Dhcp.pm index 055dd055..04de9634 100755 --- a/dhcp_wizard/Dhcp.pm +++ b/dhcp_wizard/Dhcp.pm @@ -141,27 +141,13 @@ $o->{pages} = { sub compute_range { my ($d, $s) = @_; - my $n; - if ($d <= 64) { - $n = "65"; - } elsif ($d <= 128) { - $n = "129"; - } else { - $n = "1"; - } + my $n = $d <= 64 ? "65" : $d <= 128 ? "129" : "1"; "$s.$n"; } sub compute_range2 { my ($d, $s) = @_; - my $n; - if ($d <= 128) { - $n = "254"; - } elsif ($d > 192) { - $n = "192"; - } else { - $n = "128"; - } + my $n = $d <= 128 ? "254" : $d > 192 ? "192" : "128"; "$s.$n"; } |