aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-12-04 14:46:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:02 +0100
commite42a92ae640dc22ecb4eb7705ddfe89aeadb92cc (patch)
treeb73e10c9dbda5dc032bee02602c82c6895fcb632 /target-i386
parentab3ad07f89c7f9e03c17c98e1d1a02dbf61c605c (diff)
downloadqemu-e42a92ae640dc22ecb4eb7705ddfe89aeadb92cc.zip
qemu-e42a92ae640dc22ecb4eb7705ddfe89aeadb92cc.tar.gz
qemu-e42a92ae640dc22ecb4eb7705ddfe89aeadb92cc.tar.bz2
x86: Drop some superfluous casts from void *
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.c2
-rw-r--r--target-i386/kvm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a2dde11..ef7d71c 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1556,7 +1556,7 @@ static char *x86_cpuid_get_vendor(Object *obj, Error **errp)
CPUX86State *env = &cpu->env;
char *value;
- value = (char *)g_malloc(CPUID_VENDOR_SZ + 1);
+ value = g_malloc(CPUID_VENDOR_SZ + 1);
x86_cpu_vendor_words2str(value, env->cpuid_vendor1, env->cpuid_vendor2,
env->cpuid_vendor3);
return value;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 8832a02..f92edfe 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -96,7 +96,7 @@ static struct kvm_cpuid2 *try_get_cpuid(KVMState *s, int max)
int r, size;
size = sizeof(*cpuid) + max * sizeof(*cpuid->entries);
- cpuid = (struct kvm_cpuid2 *)g_malloc0(size);
+ cpuid = g_malloc0(size);
cpuid->nent = max;
r = kvm_ioctl(s, KVM_GET_SUPPORTED_CPUID, cpuid);
if (r == 0 && cpuid->nent >= max) {