[PATCH 63/75] vmx: Use g_strdup_printf() instead of virAsprintf()

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

 



Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/vmx/vmx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 6f47546edf..8aaefba1c1 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2081,7 +2081,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
                 goto cleanup;
             }
 
-            virAsprintf(&prefix, "scsi%d:%d", controllerOrBus, unit);
+            prefix = g_strdup_printf("scsi%d:%d", controllerOrBus, unit);
 
             (*def)->dst =
                virIndexToDiskName
@@ -2103,7 +2103,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
                 goto cleanup;
             }
 
-            virAsprintf(&prefix, "ide%d:%d", controllerOrBus, unit);
+            prefix = g_strdup_printf("ide%d:%d", controllerOrBus, unit);
 
             (*def)->dst = virIndexToDiskName(controllerOrBus * 2 + unit, "hd");
 
@@ -2132,7 +2132,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
                 goto cleanup;
             }
 
-            virAsprintf(&prefix, "floppy%d", unit);
+            prefix = g_strdup_printf("floppy%d", unit);
 
             (*def)->dst = virIndexToDiskName(unit, "fd");
 
@@ -2839,7 +2839,7 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port,
 
         (*def)->source->data.tcp.host = g_strdup(parsedUri->server);
 
-        virAsprintf(&(*def)->source->data.tcp.service, "%d", parsedUri->port);
+        (*def)->source->data.tcp.service = g_strdup_printf("%d", parsedUri->port);
 
         /* See vSphere API documentation about VirtualSerialPortURIBackingInfo */
         if (parsedUri->scheme == NULL ||
-- 
2.21.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