From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: Re: [PATCH] ioemu: Initialize ioport_opaque to zero
Date: Wed, 19 Mar 2008 17:07:03 +0000 [thread overview]
Message-ID: <20080319170703.GF9372@implementation.uk.xensource.com> (raw)
In-Reply-To: <20080319170259.GE9372@implementation.uk.xensource.com>
Samuel Thibault, le Wed 19 Mar 2008 17:02:59 +0000, a écrit :
> ioemu: Initialize ioport_opaque to zero
> since register_ioport_read requires it.
Mmm, actually ioport_read/write_table need it too:
ioemu: Initialize ioport_opaque, ioport_read/write_table to zero
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:05:03 2008 +0000
@@ -281,9 +281,9 @@ void default_ioport_writel(void *opaque,
void init_ioports(void)
{
- ioport_opaque = malloc(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));
+ ioport_opaque = calloc(MAX_IOPORTS, sizeof(*ioport_opaque));
+ ioport_read_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_read_table));
+ ioport_write_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_write_table));
}
/* size is the word size in byte */
prev parent reply other threads:[~2008-03-19 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-19 17:02 [PATCH] ioemu: Initialize ioport_opaque to zero Samuel Thibault
2008-03-19 17:07 ` Samuel Thibault [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080319170703.GF9372@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.