[pve-devel] [PATCH qemu-server 18/19] machine: code cleanup: avoid superfluous augmented assignment operator

Fiona Ebner f.ebner at proxmox.com
Fri Jan 3 16:58:01 CET 2025


Suggested by perlcritic.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/QemuServer/Machine.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
index 79be4a0e..3b9c826e 100644
--- a/PVE/QemuServer/Machine.pm
+++ b/PVE/QemuServer/Machine.pm
@@ -248,7 +248,7 @@ sub get_vm_machine {
     my $machine = $forcemachine || $machine_conf->{type};
 
     if (!$machine || $machine =~ m/^(?:pc|q35|virt)$/) {
-	my $kvmversion //= PVE::QemuServer::Helpers::kvm_user_version();
+	my $kvmversion = PVE::QemuServer::Helpers::kvm_user_version();
 	# we must pin Windows VMs without a specific version and no meta info about creation QEMU to
 	# 5.1, as 5.2 fixed a bug in ACPI layout which confuses windows quite a bit and may result
 	# in various regressions..
-- 
2.39.5





More information about the pve-devel mailing list