qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, rth@twiddle.net
Subject: [Qemu-devel] [PATCH 4/4] x86: Drop some superfluous casts from void *
Date: Thu,  4 Dec 2014 14:46:46 +0100	[thread overview]
Message-ID: <1417700806-23127-5-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1417700806-23127-1-git-send-email-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 target-i386/cpu.c | 2 +-
 target-i386/kvm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index e9df33e..e132c7e 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1530,7 +1530,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 c1559c4..7a2fda5 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -95,7 +95,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) {
-- 
1.9.3

  parent reply	other threads:[~2014-12-04 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 13:46 [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc() Markus Armbruster
2014-12-04 13:46 ` [Qemu-devel] [PATCH 1/4] x86: Drop superfluous conditionals around g_free() Markus Armbruster
2014-12-04 13:46 ` [Qemu-devel] [PATCH 2/4] x86: Fuse g_malloc(); memset() into g_malloc0() Markus Armbruster
2014-12-04 13:46 ` [Qemu-devel] [PATCH 3/4] x86: Use g_new() & friends where that makes obvious sense Markus Armbruster
2014-12-04 13:46 ` Markus Armbruster [this message]
2014-12-05 15:09 ` [Qemu-devel] [PATCH 0/4] x86: Trivial cleanups around g_malloc() Eric Blake
2014-12-05 15:40 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417700806-23127-5-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).