qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fix some variable initizalization issues


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH] fix some variable initizalization issues
Date: Wed, 12 Nov 2008 11:22:07 +0000
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

I think this patch should be applied, makes valgrind happier :)

Stefano Stabellini wrote:

> Hi all,
> this patch fixes two variable initialization issues.
> 
> Signed-off-by: Stefano Stabellini <address@hidden>
> 
> ---
> 
> diff --git a/hw/vga.c b/hw/vga.c
> index 9540db0..ca8acfe 100644
> --- 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;
>  }
> diff --git a/qemu-char.c b/qemu-char.c
> index ceffbed..be40cee 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -935,6 +935,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);
> 
> 
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]