[pve-devel] [PATCH qemu-server] cleanup: get rid of unnecessary closures
Fabian Ebner
f.ebner at proxmox.com
Wed Apr 29 13:34:08 CEST 2020
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
Follow-up for https://pve.proxmox.com/pipermail/pve-devel/2020-April/043041.html
PVE/QemuServer.pm | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 63b368f..efacc45 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4339,17 +4339,10 @@ sub foreach_volid {
include_unused => 1,
};
- PVE::QemuConfig->foreach_volume_full($conf, $include_opts, sub {
- my ($ds, $drive) = @_;
- $test_volid->($ds, $drive);
- });
-
+ PVE::QemuConfig->foreach_volume_full($conf, $include_opts, $test_volid);
foreach my $snapname (keys %{$conf->{snapshots}}) {
my $snap = $conf->{snapshots}->{$snapname};
- PVE::QemuConfig->foreach_volume_full($snap, $include_opts, sub {
- my ($ds, $drive) = @_;
- $test_volid->($ds, $drive, $snapname);
- });
+ PVE::QemuConfig->foreach_volume_full($snap, $include_opts, $test_volid, $snapname);
}
foreach my $volid (keys %$volhash) {
--
2.20.1
More information about the pve-devel
mailing list