summaryrefslogtreecommitdiffstats
path: root/hw/s390x
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2016-03-10 10:19:46 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:36 -0600
commit4fd8a7b10d0e4ca1cc3c2c9bd1782ac91169b997 (patch)
tree79d89868eb9c031dd266fc74dddad8ecf8ed087b /hw/s390x
parent30fb23b367adf4403ca2ee7c5f03f1affe727623 (diff)
downloadhqemu-4fd8a7b10d0e4ca1cc3c2c9bd1782ac91169b997.zip
hqemu-4fd8a7b10d0e4ca1cc3c2c9bd1782ac91169b997.tar.gz
s390x/cpu: use g_new0
Let's use g_new0 to allocate cpu_states. Suggested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/s390-virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 4ea9040..7c6e281 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -103,7 +103,7 @@ void s390_init_cpus(MachineState *machine)
machine->cpu_model = "host";
}
- cpu_states = g_malloc0(sizeof(S390CPU *) * max_cpus);
+ cpu_states = g_new0(S390CPU *, max_cpus);
for (i = 0; i < max_cpus; i++) {
name = g_strdup_printf("cpu[%i]", i);
OpenPOWER on IntegriCloud