qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] s390: Fix buggy assignment


From: Stefan Weil
Subject: [Qemu-devel] [PATCH] s390: Fix buggy assignment
Date: Mon, 14 Dec 2009 10:39:12 +0100

nd->model keeps dynamically allocated model names.
So casting of a constant string is wrong here.

Signed-off-by: Stefan Weil <address@hidden>
---
 hw/s390-virtio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index b567886..b57fa9c 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -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")) {
-- 
1.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]