Commit c3b972c30d9052df7eb535a14b4e2c8c6bb12743

Authored by aliguori
1 parent dccfec67

fix some variable initizalization issues (Stefano Stabellini)

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
Showing 2 changed files with 2 additions and 1 deletions
hw/vga.c
... ... @@ -2396,7 +2396,7 @@ static void vga_save_dpy_update(DisplayState *s,
2396 2396 static void vga_save_dpy_resize(DisplayState *s, int w, int h)
2397 2397 {
2398 2398 s->linesize = w * 4;
2399   - s->data = qemu_malloc(h * s->linesize);
  2399 + s->data = qemu_mallocz(h * s->linesize);
2400 2400 vga_save_w = w;
2401 2401 vga_save_h = h;
2402 2402 }
... ...
qemu-char.c
... ... @@ -941,6 +941,7 @@ static CharDriverState *qemu_chr_open_pty(void)
941 941 }
942 942  
943 943 /* Set raw attributes on the pty. */
  944 + tcgetattr(slave_fd, &tty);
944 945 cfmakeraw(&tty);
945 946 tcsetattr(slave_fd, TCSAFLUSH, &tty);
946 947 close(slave_fd);
... ...