summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/gpt.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-07-08 05:43:56 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-07-08 11:48:12 +0200
commiteb15e0ef31edcdff2ad72a39ecdcb706bd400e94 (patch)
treeea896276704e40278fdf20fbf40aad965e37d2d3 /perl-install/partition_table/gpt.pm
parent451842633764d691bf45730f5469a50f83731928 (diff)
downloaddrakx-eb15e0ef31edcdff2ad72a39ecdcb706bd400e94.tar
drakx-eb15e0ef31edcdff2ad72a39ecdcb706bd400e94.tar.gz
drakx-eb15e0ef31edcdff2ad72a39ecdcb706bd400e94.tar.bz2
drakx-eb15e0ef31edcdff2ad72a39ecdcb706bd400e94.tar.xz
drakx-eb15e0ef31edcdff2ad72a39ecdcb706bd400e94.zip
(initialize) simplify
Diffstat (limited to 'perl-install/partition_table/gpt.pm')
-rw-r--r--perl-install/partition_table/gpt.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 5ef358e82..c5af99275 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -113,11 +113,8 @@ sub write {
sub initialize {
my ($class, $hd) = @_;
- my @raw;
- for (my $part_number = 0; $part_number < $nb_primary-1; $part_number++) {
- # part_number starts at 1
- $raw[$part_number] = { part_number => $part_number + 1 };
- }
+ # part_number starts at 1
+ my @raw = map { +{ part_number => $_ + 1 } } 0..$nb_primary-2;
$hd->{primary} = { raw => \@raw };
bless $hd, $class;
}