All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>
Cc: qemu-trivial@nongnu.org, jan.kiszka@siemens.com,
	luonengjun@huawei.com, qemu-devel@nongnu.org,
	peter.huangpeng@huawei.com
Subject: Re: [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc()
Date: Tue, 19 Aug 2014 11:32:55 +0400	[thread overview]
Message-ID: <53F2FDA7.6040902@msgid.tls.msk.ru> (raw)
In-Reply-To: <53F2FD31.1010102@huawei.com>

19.08.2014 11:30, zhanghailiang wrote:
[]
> Hmm, it is a good idea to use g_new instead of g_malloc,
> we have to perform type cast for g_malloc.(BTW, i found in qemu there
> are several places use g_malloc but not perform appropriate type
> coercions)

There's no need to perform explicit type conversion from void* to type*.

Thanks,

/mjt


WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>
Cc: qemu-trivial@nongnu.org, jan.kiszka@siemens.com,
	luonengjun@huawei.com, qemu-devel@nongnu.org,
	peter.huangpeng@huawei.com
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc()
Date: Tue, 19 Aug 2014 11:32:55 +0400	[thread overview]
Message-ID: <53F2FDA7.6040902@msgid.tls.msk.ru> (raw)
In-Reply-To: <53F2FD31.1010102@huawei.com>

19.08.2014 11:30, zhanghailiang wrote:
[]
> Hmm, it is a good idea to use g_new instead of g_malloc,
> we have to perform type cast for g_malloc.(BTW, i found in qemu there
> are several places use g_malloc but not perform appropriate type
> coercions)

There's no need to perform explicit type conversion from void* to type*.

Thanks,

/mjt

  reply	other threads:[~2014-08-19  7:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  7:51 [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc() zhanghailiang
2014-08-18  7:51 ` [Qemu-devel] " zhanghailiang
2014-08-18 11:32 ` [Qemu-trivial] " Michael Tokarev
2014-08-18 11:32   ` [Qemu-devel] " Michael Tokarev
2014-08-18 20:23   ` [Qemu-trivial] [Qemu-devel] " Jeff Cody
2014-08-18 20:23     ` [Qemu-devel] [Qemu-trivial] " Jeff Cody
2014-08-19  7:30   ` zhanghailiang
2014-08-19  7:30     ` [Qemu-devel] " zhanghailiang
2014-08-19  7:32     ` Michael Tokarev [this message]
2014-08-19  7:32       ` Michael Tokarev

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=53F2FDA7.6040902@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=jan.kiszka@siemens.com \
    --cc=luonengjun@huawei.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.