[pve-devel] [PATCH storage] disks: fix warnings

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Oct 7 08:53:26 CEST 2016


---
 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.1.4





More information about the pve-devel mailing list