diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-03-10 10:19:46 +0100 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-03-10 12:02:02 +0100 |
commit | 75cfb3bb41005b1cbba4954057ad5426df83f6d7 (patch) | |
tree | aead1869d772fca4f8180cc0675eee8de67293d4 /hw | |
parent | 8b8a61ad8cc054e52b5d17c8ba45691d2dc0acbd (diff) | |
download | qemu-75cfb3bb41005b1cbba4954057ad5426df83f6d7.tar.gz qemu-75cfb3bb41005b1cbba4954057ad5426df83f6d7.tar.bz2 qemu-75cfb3bb41005b1cbba4954057ad5426df83f6d7.zip |
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')
-rw-r--r-- | hw/s390x/s390-virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c index 4ea9040f3a..7c6e281af1 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); |