From: Ian Jackson Date: Mon, 24 Nov 2008 17:03:16 +0000 (+0000) Subject: fix a few variable initializations X-Git-Tag: t.master-before-merge~56 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=eda021e2070449dab15083fa6ee55f4085ca4606;p=qemu-xen-3.4-testing.git fix a few variable initializations Fix few variable initializations. Signed-off-by: Stefano Stabellini --- 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);