[PATCH v3 39/52] qemu: Use typedef for virQEMUCapsMachineType

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---

Notes:
    Version 3:
    - new patch

 src/qemu/qemu_capabilities.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b21aadf864..0a00f2c361 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -550,7 +550,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
     );
 
 
-struct virQEMUCapsMachineType {
+typedef struct _virQEMUCapsMachineType virQEMUCapsMachineType;
+typedef virQEMUCapsMachineType *virQEMUCapsMachineTypePtr;
+struct _virQEMUCapsMachineType {
     char *name;
     char *alias;
     unsigned int maxCpus;
@@ -616,7 +618,7 @@ struct _virQEMUCaps {
     virHashTablePtr domCapsCache;
 
     size_t nmachineTypes;
-    struct virQEMUCapsMachineType *machineTypes;
+    virQEMUCapsMachineTypePtr machineTypes;
 
     size_t ngicCapabilities;
     virGICCapability *gicCapabilities;
@@ -734,7 +736,7 @@ static void
 virQEMUCapsSetDefaultMachine(virQEMUCapsPtr qemuCaps,
                              size_t defIdx)
 {
-    struct virQEMUCapsMachineType tmp = qemuCaps->machineTypes[defIdx];
+    virQEMUCapsMachineType tmp = qemuCaps->machineTypes[defIdx];
 
     memmove(qemuCaps->machineTypes + 1,
             qemuCaps->machineTypes,
@@ -2387,7 +2389,7 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
         goto cleanup;
 
     for (i = 0; i < nmachines; i++) {
-        struct virQEMUCapsMachineType *mach;
+        virQEMUCapsMachineTypePtr mach;
         if (STREQ(machines[i]->name, "none"))
             continue;
 
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[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