]> xenbits.xensource.com Git - xenclient/ioemu.git/commitdiff
fix a few variable initializations
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 24 Nov 2008 17:03:16 +0000 (17:03 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 24 Nov 2008 17:03:16 +0000 (17:03 +0000)
Fix few variable initializations.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/vga.c
vl.c

index f2ce4feff6a25b2a3112e6e9676a354edd695e74..dc1f8ec981103ce1f4b854dbedc0999db30a8822 100644 (file)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2493,7 +2493,7 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
 
     vga_reset(s);
 
-    s->vram_ptr = qemu_malloc(vga_ram_size);
+    s->vram_ptr = qemu_mallocz(vga_ram_size);
     s->vram_mfns = NULL;
     xen_vga_state = s;
 
@@ -2652,7 +2652,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/vl.c b/vl.c
index d72acac3d2e8ea6157196a6f816c24a45b9860fd..a699361c88171550af18cc4facae45ce0d2b5c5c 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2632,6 +2632,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);