From eda021e2070449dab15083fa6ee55f4085ca4606 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 24 Nov 2008 17:03:16 +0000 Subject: [PATCH] fix a few variable initializations Fix few variable initializations. Signed-off-by: Stefano Stabellini --- hw/vga.c | 4 ++-- vl.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index f2ce4fef..dc1f8ec9 100644 --- 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 d72acac3..a699361c 100644 --- 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); -- 2.39.5