From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NK7Ou-0005Mi-PJ for qemu-devel@nongnu.org; Mon, 14 Dec 2009 04:39:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NK7Op-0005FP-Ga for qemu-devel@nongnu.org; Mon, 14 Dec 2009 04:39:31 -0500 Received: from [199.232.76.173] (port=47707 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NK7Op-0005F9-8m for qemu-devel@nongnu.org; Mon, 14 Dec 2009 04:39:27 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:54819) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NK7Oo-0007rg-Ol for qemu-devel@nongnu.org; Mon, 14 Dec 2009 04:39:27 -0500 From: Stefan Weil Date: Mon, 14 Dec 2009 10:39:12 +0100 Message-Id: <1260783552-13025-1-git-send-email-weil@mail.berlios.de> Subject: [Qemu-devel] [PATCH] s390: Fix buggy assignment List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers , Alexander Graf , Aurelien Jarno nd->model keeps dynamically allocated model names. So casting of a constant string is wrong here. Signed-off-by: Stefan Weil --- 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