summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Goller <g.goller@proxmox.com>2025-05-20 17:01:01 +0200
committerThomas Lamprecht <t.lamprecht@proxmox.com>2025-05-21 14:01:55 +0200
commit7af377c9024aa47f337e374317df5d77cb85bdfd (patch)
tree85f7542419badbad5c4ff1e732a395567a5d4a59 /src
parent8f4f5d2074989cf814d2f2312360239377c495f5 (diff)
api: controller: iterate over keys instead of whole map
Previously, we iterated over the entire hash (keys and values), which added unnecessary data to the configuration. This commit changes the loop to iterate only over the hash keys. Nothing should change as the garbled properties were removed down the line anyway. Signed-off-by: Gabriel Goller <g.goller@proxmox.com> Link: https://lore.proxmox.com/20250520150101.283640-1-g.goller@proxmox.com
Diffstat (limited to 'src')
-rw-r--r--src/PVE/API2/Network/SDN/Controllers.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PVE/API2/Network/SDN/Controllers.pm b/src/PVE/API2/Network/SDN/Controllers.pm
index 38a685d..b776273 100644
--- a/src/PVE/API2/Network/SDN/Controllers.pm
+++ b/src/PVE/API2/Network/SDN/Controllers.pm
@@ -235,7 +235,7 @@ __PACKAGE__->register_method ({
PVE::SectionConfig::delete_from_config($scfg, $options, $opts, $delete);
}
- foreach my $k (%$opts) {
+ for my $k (keys %{$opts}) {
$scfg->{$k} = $opts->{$k};
}