WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: Initialize ioport_opaque, ioport_r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Initialize ioport_opaque, ioport_read/write_table to zero
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:41:18 -0700
Delivery-date: Thu, 20 Mar 2008 05:46:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206010012 0
# Node ID 27df0fe73b319f23e444c90e361c517baa1a940b
# Parent  edfd0c343b13e76f04b6dc491be30464f0fe6216
ioemu: Initialize ioport_opaque, ioport_read/write_table to zero

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 tools/ioemu/vl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r edfd0c343b13 -r 27df0fe73b31 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Wed Mar 19 16:21:39 2008 +0000
+++ b/tools/ioemu/vl.c  Thu Mar 20 10:46:52 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 */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Initialize ioport_opaque, ioport_read/write_table to zero, Xen patchbot-unstable <=