debuggers.hg
changeset 17300:27df0fe73b31
ioemu: Initialize ioport_opaque, ioport_read/write_table to zero
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Mar 20 10:46:52 2008 +0000 (2008-03-20) |
parents | edfd0c343b13 |
children | 5c940fbeb82c |
files | tools/ioemu/vl.c |
line diff
1.1 --- a/tools/ioemu/vl.c Wed Mar 19 16:21:39 2008 +0000 1.2 +++ b/tools/ioemu/vl.c Thu Mar 20 10:46:52 2008 +0000 1.3 @@ -281,9 +281,9 @@ void default_ioport_writel(void *opaque, 1.4 1.5 void init_ioports(void) 1.6 { 1.7 - ioport_opaque = malloc(MAX_IOPORTS * sizeof(*ioport_opaque)); 1.8 - ioport_read_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_read_table)); 1.9 - ioport_write_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_write_table)); 1.10 + ioport_opaque = calloc(MAX_IOPORTS, sizeof(*ioport_opaque)); 1.11 + ioport_read_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_read_table)); 1.12 + ioport_write_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_write_table)); 1.13 } 1.14 1.15 /* size is the word size in byte */