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>
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);
&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;