]> git.proxmox.com Git - pve-storage.git/commitdiff
disks: fix warnings
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 7 Oct 2016 06:53:26 +0000 (08:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 7 Oct 2016 07:28:06 +0000 (09:28 +0200)
PVE/API2/Disks.pm
PVE/Diskmanage.pm

index 366cd629137839930c555216445c8297cd9b8101..de8287e16bfbe4caf69e50d39b8bc07403fcea40 100644 (file)
@@ -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};
index 97c6f7b4331e0d40bd9f61d8f9489bfd768cc640..6cc5e1c7f4d19e4b1d050b99fbf24443107e8ae2 100644 (file)
@@ -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