OSDN Git Service

cocoa: Replace non-portable asprintf() by g_strdup_printf()
authorStefan Weil <sw@weilnetz.de>
Wed, 16 Jan 2013 07:38:40 +0000 (07:38 +0000)
committerAndreas Färber <andreas.faerber@web.de>
Thu, 31 Jan 2013 21:27:00 +0000 (22:27 +0100)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
ui/cocoa.m

index fbd7386..ca42413 100644 (file)
@@ -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);