fix some variable initizalization issues (Stefano Stabellini)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 12 Nov 2008 15:00:36 +0000 (15:00 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 12 Nov 2008 15:00:36 +0000 (15:00 +0000)
this patch fixes two variable initialization issues.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5705 c046a42c-6fe2-441c-8c8c-71466251a162

hw/vga.c
qemu-char.c

index 9540db034352b379ce62301c944dd548493df1c2..ca8acfe24ed02c3a5ed7abad55cd647a356b15a0 100644 (file)
--- 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;
 }
index ad57948173bbf845849726b1f76eaf7a7a6edf30..2cf8644542916d60ce25d74920d4083988f9948e 100644 (file)
@@ -941,6 +941,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);