From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 638321FF0C0 for ; Wed, 18 Nov 2026 15:45:36 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0640D21799; Wed, 18 Nov 2026 15:45:24 +0100 (CET) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH ha-manager v4 03/17] tree-wide: remove unused return values at parse_sid callsites Date: Wed, 18 Nov 2026 15:44:48 +0100 Message-ID: <20261118144502.231134-4-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261118144502.231134-1-d.kral@proxmox.com> References: <20261118144502.231134-1-d.kral@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795013118802 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.490 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ARZ7NSB5TWWA67NEWVXMO5ZI6GANXWXK X-Message-ID-Hash: ARZ7NSB5TWWA67NEWVXMO5ZI6GANXWXK X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Remove the unused return values so it's easier to see which return values are actually needed by the specific call sites. Signed-off-by: Daniel Kral Reviewed-by: Michael Köppl Tested-by: Michael Köppl --- src/PVE/API2/HA/Resources.pm | 8 ++++---- src/PVE/HA/Config.pm | 2 +- src/PVE/HA/Manager.pm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PVE/API2/HA/Resources.pm b/src/PVE/API2/HA/Resources.pm index a09b9d17..5c9dd6b9 100644 --- a/src/PVE/API2/HA/Resources.pm +++ b/src/PVE/API2/HA/Resources.pm @@ -301,7 +301,7 @@ __PACKAGE__->register_method({ my $digest = extract_param($param, 'digest'); my $delete = extract_param($param, 'delete'); - my ($sid, $type, $vmid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); + my ($sid, $type) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); if (my $param_type = extract_param($param, 'type')) { # useless, but do it anyway @@ -361,7 +361,7 @@ __PACKAGE__->register_method({ code => sub { my ($param) = @_; - my ($sid, $type, $vmid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); + my ($sid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); my $purge = extract_param($param, 'purge') // 1; if (!PVE::HA::Config::service_is_configured($sid)) { @@ -461,7 +461,7 @@ __PACKAGE__->register_method({ my $result = {}; - my ($sid, $type, $vmid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); + my ($sid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); my $req_node = extract_param($param, 'node'); my $resource_type = extract_param($param, 'resource-type'); if ($resource_type ne $type) { @@ -585,7 +585,7 @@ __PACKAGE__->register_method({ my $result = {}; - my ($sid, $type, $vmid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); + my ($sid) = PVE::HA::Config::parse_sid(extract_param($param, 'sid')); my $req_node = extract_param($param, 'node'); PVE::HA::Config::service_is_ha_managed($sid); diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm index ec0551e9..84102592 100644 --- a/src/PVE/HA/Config.pm +++ b/src/PVE/HA/Config.pm @@ -148,7 +148,7 @@ sub read_and_check_resources_config { my sub update_single_resource_config_inplace { my ($cfg, $sid, $param, $delete) = @_; - ($sid, my $type, my $vmid) = parse_sid($sid); + ($sid, my $type) = parse_sid($sid); my $scfg = $cfg->{ids}->{$sid} || die "no such resource '$sid'\n"; diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index 5c21fbe7..ab574f23 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -285,7 +285,7 @@ sub load_balance { my ($sid, $source, $target) = $migration->@{qw(sid source-node target-node)}; - my (undef, $type, $id) = $haenv->parse_sid($sid); + my (undef, $type) = $haenv->parse_sid($sid); my $task = $type eq 'vm' ? "migrate" : "relocate"; my $cmd = "$task $sid $target"; -- 2.47.3