[PATCH 02/12] tools: reduce scope of a DIR* in virHostValidateIOMMU()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will make the trivial nature of a conversion to g_autoptr (in a
later patch) more obvious.

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 tools/virt-host-validate-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index 9779eb7b3b..61284ae4da 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -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
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux