From: Stefan Weil Date: Mon, 14 Dec 2009 09:39:12 +0000 (+0100) Subject: s390: Fix buggy assignment X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~9297 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a2b3fc5aaae48859e09a8d96f4f92578b060892;p=sdk%2Femulator%2Fqemu.git s390: Fix buggy assignment nd->model keeps dynamically allocated model names. So casting of a constant string is wrong here. Signed-off-by: Stefan Weil Acked-by: Alexander Graf Signed-off-by: Aurelien Jarno --- 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")) {