From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxKXw-00048a-KV for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:58:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxKXv-000480-Ht for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:58:07 -0500 Received: from [199.232.76.173] (port=45793 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxKXv-00047u-9R for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:58:07 -0500 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:10382 helo=SMTP.EU.CITRIX.COM) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxKXu-0000qw-I3 for qemu-devel@nongnu.org; Tue, 04 Nov 2008 06:58:06 -0500 Message-ID: <49103994.5090406@eu.citrix.com> Date: Tue, 04 Nov 2008 12:01:24 +0000 From: Stefano Stabellini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] fix some variable initizalization issues Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ian Jackson Hi all, this patch fixes two variable initialization issues. Signed-off-by: Stefano Stabellini --- diff --git a/hw/vga.c b/hw/vga.c index 9540db0..ca8acfe 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2396,7 +2396,7 @@ static void vga_save_dpy_update(DisplayState *s, static void vga_save_dpy_resize(DisplayState *s, int w, int h) { s->linesize = w * 4; - s->data = qemu_malloc(h * s->linesize); + s->data = qemu_mallocz(h * s->linesize); vga_save_w = w; vga_save_h = h; } diff --git a/qemu-char.c b/qemu-char.c index ceffbed..be40cee 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -935,6 +935,7 @@ static CharDriverState *qemu_chr_open_pty(void) } /* Set raw attributes on the pty. */ + tcgetattr(slave_fd, &tty); cfmakeraw(&tty); tcsetattr(slave_fd, TCSAFLUSH, &tty); close(slave_fd);