mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemuDomainNamespaceTeardownHostdev: Drop useless check
There is no need to check if @npaths is not zero. Let's qemuDomainNamespaceUnlinkPaths() handle that. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
dbfe8acae5
commit
80f4183a0c
@ -12476,7 +12476,8 @@ qemuDomainNamespaceUnlinkPaths(virDomainObjPtr vm,
|
||||
size_t i;
|
||||
int ret = -1;
|
||||
|
||||
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
|
||||
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT) ||
|
||||
!npaths)
|
||||
return 0;
|
||||
|
||||
cfg = virQEMUDriverGetConfig(driver);
|
||||
@ -12606,8 +12607,7 @@ qemuDomainNamespaceTeardownHostdev(virDomainObjPtr vm,
|
||||
&npaths, &paths, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (npaths != 0 &&
|
||||
qemuDomainNamespaceUnlinkPaths(vm, (const char **)paths, npaths) < 0)
|
||||
if (qemuDomainNamespaceUnlinkPaths(vm, (const char **)paths, npaths) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user