[pve-devel] [PATCH qemu-server 2/7] cpu config: style fix: avoid overly long ternary conditional expression
Fiona Ebner
f.ebner at proxmox.com
Fri Oct 31 13:27:38 CET 2025
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
src/PVE/QemuServer/CPUConfig.pm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index 1fdae415..e72bdf2f 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -636,16 +636,16 @@ sub get_cpu_options {
my $pve_flags = get_pve_cpu_flags($conf, $kvm, $cputype, $arch, $machine_version);
- my $hv_flags =
- $kvm
- ? get_hyperv_enlightenments(
+ my $hv_flags;
+ if ($kvm) {
+ $hv_flags = get_hyperv_enlightenments(
$winversion,
$machine_version,
$conf->{bios},
$gpu_passthrough,
$hv_vendor_id,
- )
- : undef;
+ );
+ }
my $builtin_cputype_flags =
parse_cpuflag_list($cpu_flag_any_re, "set by builtin CPU model", $builtin_cpu->{flags});
--
2.47.3
More information about the pve-devel
mailing list