]> git.proxmox.com Git - qemu-server.git/commitdiff
followup: refactor loop to use perls values
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Apr 2020 15:15:28 +0000 (17:15 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Apr 2020 15:15:28 +0000 (17:15 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Qemu.pm

index e19f7d93bea6da6eb33d716f8b94864c69989eb7..027bbf6fdcf49a4c597fa94d38170b9b752149e6 100644 (file)
@@ -3469,8 +3469,8 @@ __PACKAGE__->register_method({
            $rpcenv->check_vm_perm($authuser, $vmid, undef, ['VM.Config.Disk'])
                if !defined($storagemap->{identity});
 
-           foreach my $source (keys %{$storagemap->{entries}}) {
-               $check_storage->($storagemap->{entries}->{$source});
+           foreach my $source (values %{$storagemap->{entries}}) {
+               $check_storage->($source);
            }
 
            $check_storage->($storagemap->{default})