mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
tools: reduce scope of a DIR* in virHostValidateIOMMU()
This will make the trivial nature of a conversion to g_autoptr (in a later patch) more obvious. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
c40b673182
commit
59fc1e35eb
@ -336,7 +336,6 @@ int virHostValidateIOMMU(const char *hvname,
|
||||
bool isAMD = false, isIntel = false;
|
||||
virArch arch = virArchFromHost();
|
||||
struct dirent *dent;
|
||||
DIR *dir;
|
||||
int rc;
|
||||
|
||||
flags = virHostValidateGetCPUFlags();
|
||||
@ -375,6 +374,8 @@ int virHostValidateIOMMU(const char *hvname,
|
||||
} else if (ARCH_IS_PPC64(arch)) {
|
||||
/* Empty Block */
|
||||
} else if (ARCH_IS_S390(arch)) {
|
||||
DIR *dir;
|
||||
|
||||
/* On s390x, we skip the IOMMU check if there are no PCI
|
||||
* devices (which is quite usual on s390x). If there are
|
||||
* no PCI devices the directory is still there but is
|
||||
|
Loading…
x
Reference in New Issue
Block a user