[PATCH 3/4] ch: Drop useless variable in chDomainFindDisk()

Michal Privoznik via Devel posted 4 patches 3 weeks, 3 days ago
[PATCH 3/4] ch: Drop useless variable in chDomainFindDisk()
Posted by Michal Privoznik via Devel 3 weeks, 3 days ago
From: Michal Privoznik <mprivozn@redhat.com>

The 'disk' variable inside of chDomainFindDisk() is not used
really. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/ch/ch_hotplug.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ch/ch_hotplug.c b/src/ch/ch_hotplug.c
index aa723dd123..cfa11cc5e5 100644
--- a/src/ch/ch_hotplug.c
+++ b/src/ch/ch_hotplug.c
@@ -185,7 +185,6 @@ chDomainFindDisk(virDomainObj *vm,
                  virDomainDiskDef *match,
                  virDomainDiskDef **detach)
 {
-    virDomainDiskDef *disk;
     int idx;
 
     if ((idx = chFindDiskId(vm->def, match->dst)) < 0) {
@@ -193,7 +192,7 @@ chDomainFindDisk(virDomainObj *vm,
                        _("disk %1$s not found"), match->dst);
         return -1;
     }
-    *detach = disk = vm->def->disks[idx];
+    *detach = vm->def->disks[idx];
 
     return 0;
 }
-- 
2.49.1