* [Qemu-devel] [PATCH] fix some variable initizalization issues
@ 2008-11-04 12:01 Stefano Stabellini
2008-11-12 11:22 ` Stefano Stabellini
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2008-11-04 12:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Ian Jackson
Hi all,
this patch fixes two variable initialization issues.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] fix some variable initizalization issues
2008-11-04 12:01 [Qemu-devel] [PATCH] fix some variable initizalization issues Stefano Stabellini
@ 2008-11-12 11:22 ` Stefano Stabellini
2008-11-12 15:00 ` Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2008-11-12 11:22 UTC (permalink / raw)
To: qemu-devel
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 <stefano.stabellini@eu.citrix.com>
>
> ---
>
> 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);
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] fix some variable initizalization issues
2008-11-12 11:22 ` Stefano Stabellini
@ 2008-11-12 15:00 ` Anthony Liguori
0 siblings, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-11-12 15:00 UTC (permalink / raw)
To: qemu-devel
Stefano Stabellini wrote:
> I think this patch should be applied, makes valgrind happier :)
>
> Stefano Stabellini wrote:
>
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-12 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-04 12:01 [Qemu-devel] [PATCH] fix some variable initizalization issues Stefano Stabellini
2008-11-12 11:22 ` Stefano Stabellini
2008-11-12 15:00 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).