]> git.proxmox.com Git - qemu.git/commitdiff
s390: Fix buggy assignment
authorStefan Weil <weil@mail.berlios.de>
Mon, 14 Dec 2009 09:39:12 +0000 (10:39 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 16 Dec 2009 17:25:07 +0000 (18:25 +0100)
nd->model keeps dynamically allocated model names.
So casting of a constant string is wrong here.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/s390-virtio.c

index b56788652e7696037a4861f488cbcf6e31b14c99..b57fa9c2f8b52e4b95ae3a316302f0021351ad5e 100644 (file)
@@ -209,7 +209,7 @@ static void s390_init(ram_addr_t ram_size,
         DeviceState *dev;
 
         if (!nd->model) {
-            nd->model = (char*)"virtio";
+            nd->model = qemu_strdup("virtio");
         }
 
         if (strcmp(nd->model, "virtio")) {