From: Michal Privoznik Date: Tue, 9 Sep 2025 15:10:20 +0000 (+0200) Subject: ch: Drop useless variable in chDomainFindDisk() X-Git-Tag: v11.8.0-rc1~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6751994950683ae130602187a0ab335ddb674d09;p=thirdparty%2Flibvirt.git ch: Drop useless variable in chDomainFindDisk() The 'disk' variable inside of chDomainFindDisk() is not used really. Drop it. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- 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; }