public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH network] api: controller: iterate over keys instead of whole map
@ 2025-05-20 15:01 Gabriel Goller
  2025-05-21 12:04 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2025-05-20 15:01 UTC (permalink / raw)
  To: pve-devel

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>
---
 src/PVE/API2/Network/SDN/Controllers.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/API2/Network/SDN/Controllers.pm b/src/PVE/API2/Network/SDN/Controllers.pm
index 38a685d48d06..b776273a6278 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};
 	    }
 
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH network] api: controller: iterate over keys instead of whole map
  2025-05-20 15:01 [pve-devel] [PATCH network] api: controller: iterate over keys instead of whole map Gabriel Goller
@ 2025-05-21 12:04 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-05-21 12:04 UTC (permalink / raw)
  To: pve-devel, Gabriel Goller

On Tue, 20 May 2025 17:01:01 +0200, Gabriel Goller wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] api: controller: iterate over keys instead of whole map
      commit: 7af377c9024aa47f337e374317df5d77cb85bdfd


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-21 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-20 15:01 [pve-devel] [PATCH network] api: controller: iterate over keys instead of whole map Gabriel Goller
2025-05-21 12:04 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal