From d57fb43d9b7450395301493006234d1aaf85029f Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 7 Oct 2016 08:53:26 +0200 Subject: [PATCH] disks: fix warnings --- PVE/API2/Disks.pm | 2 -- PVE/Diskmanage.pm | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm index 366cd62..de8287e 100644 --- a/PVE/API2/Disks.pm +++ b/PVE/API2/Disks.pm @@ -138,8 +138,6 @@ __PACKAGE__->register_method ({ my $disk = PVE::Diskmanage::verify_blockdev_path($param->{disk}); - my $result = {}; - my $result = PVE::Diskmanage::get_smart_data($disk, $param->{healthonly}); $result->{health} = 'UNKNOWN' if !defined $result->{health}; diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index 97c6f7b..6cc5e1c 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -301,7 +301,7 @@ sub get_wear_leveling_info { my $attrid; - foreach my $vendor (keys $vendormap) { + foreach my $vendor (keys %$vendormap) { if ($model =~ m/$vendor/i) { $attrid = $vendormap->{$vendor}; # found the attribute -- 2.39.5