[pve-devel] [PATCH qemu-server v2 1/8] critic: code style: cpu config: unpack @_ first in resolve_cpu_flags()
Fiona Ebner
f.ebner at proxmox.com
Fri Nov 7 15:43:39 CET 2025
Also in preparation to add more code at the beginning of the function,
which would reduce readability further without this style fix.
Suggested-by: Daniel Kral <d.kral at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
New in v2.
src/PVE/QemuServer/CPUConfig.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index e72bdf2f..6d5a4237 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -534,9 +534,11 @@ sub print_cpu_device {
# ...
# }
sub resolve_cpu_flags {
+ my @flag_hashes = @_;
+
my $flags = {};
- for my $hash (@_) {
+ for my $hash (@flag_hashes) {
for my $flag_name (keys %$hash) {
my $flag = $hash->{$flag_name};
my $old_flag = $flags->{$flag_name};
--
2.47.3
More information about the pve-devel
mailing list