Patchwork [2/2] cocoa: Replace non-portable asprintf() by g_strdup_printf()

login
register
mail settings
Submitter Andreas Färber
Date Jan. 31, 2013, 10:01 p.m.
Message ID <1359669697-5881-3-git-send-email-andreas.faerber@web.de>
Download mbox | patch
Permalink /patch/217260/
State New
Headers show

Comments

Andreas Färber - Jan. 31, 2013, 10:01 p.m.
From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 ui/cocoa.m |    6 +++---
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index fbd7386..ca42413 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -828,9 +828,9 @@  QemuCocoaView *cocoaView;
 
         [sheet close];
 
-        asprintf(&argv[0], "%s", bin);
-        asprintf(&argv[1], "-hda");
-        asprintf(&argv[2], "%s", img);
+        argv[0] = g_strdup_printf("%s", bin);
+        argv[1] = g_strdup_printf("-hda");
+        argv[2] = g_strdup_printf("%s", img);
 
         printf("Using argc %d argv %s -hda %s\n", 3, bin, img);