All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ioemu: Initialize ioport_opaque to zero
@ 2008-03-19 17:02 Samuel Thibault
  2008-03-19 17:07 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Thibault @ 2008-03-19 17:02 UTC (permalink / raw)
  To: xen-devel

ioemu: Initialize ioport_opaque to zero
since register_ioport_read requires it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r b3c8dcb98543 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c	Wed Mar 19 16:25:52 2008 +0000
+++ b/tools/ioemu/vl.c	Wed Mar 19 17:01:36 2008 +0000
@@ -281,7 +281,7 @@ void default_ioport_writel(void *opaque,
 
 void init_ioports(void)
 {
-    ioport_opaque = malloc(MAX_IOPORTS * sizeof(*ioport_opaque));
+    ioport_opaque = calloc(MAX_IOPORTS, sizeof(*ioport_opaque));
     ioport_read_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_read_table));
     ioport_write_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_write_table));
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-19 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 17:02 [PATCH] ioemu: Initialize ioport_opaque to zero Samuel Thibault
2008-03-19 17:07 ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.