]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ch: Drop useless variable in chDomainFindDisk()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Sep 2025 15:10:20 +0000 (17:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Sep 2025 09:45:01 +0000 (11:45 +0200)
The 'disk' variable inside of chDomainFindDisk() is not used
really. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/ch/ch_hotplug.c

index aa723dd123df123e025cc287b347ce4eb8aa906c..cfa11cc5e58086042b0c194b9574b739bcfd615f 100644 (file)
@@ -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;
 }