All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>,  qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, luonengjun@huawei.com,
	peter.huangpeng@huawei.com
Subject: Re: [Qemu-trivial] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs
Date: Wed, 20 Aug 2014 18:57:58 +0400	[thread overview]
Message-ID: <53F4B776.9040508@msgid.tls.msk.ru> (raw)
In-Reply-To: <1408437017-15648-1-git-send-email-zhang.zhanghailiang@huawei.com>

19.08.2014 12:30, zhanghailiang wrote:
> Here we don't check the return value of malloc() which may fail.
> Use the g_new() instead, which will abort the program when
> there is not enough memory.
> 
> Also, use g_strdup instead of strdup and remove the unnecessary
> strdup function.

I also will remove the HAVE_STRDUP define from slirp_config.h --
it is no longer needed there.

Applied to -trivial (with the above addition), thank you!

/mjt



WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: zhanghailiang <zhang.zhanghailiang@huawei.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, luonengjun@huawei.com,
	peter.huangpeng@huawei.com
Subject: Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs
Date: Wed, 20 Aug 2014 18:57:58 +0400	[thread overview]
Message-ID: <53F4B776.9040508@msgid.tls.msk.ru> (raw)
In-Reply-To: <1408437017-15648-1-git-send-email-zhang.zhanghailiang@huawei.com>

19.08.2014 12:30, zhanghailiang wrote:
> Here we don't check the return value of malloc() which may fail.
> Use the g_new() instead, which will abort the program when
> there is not enough memory.
> 
> Also, use g_strdup instead of strdup and remove the unnecessary
> strdup function.

I also will remove the HAVE_STRDUP define from slirp_config.h --
it is no longer needed there.

Applied to -trivial (with the above addition), thank you!

/mjt

  parent reply	other threads:[~2014-08-20 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  8:30 [Qemu-trivial] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs zhanghailiang
2014-08-19  8:30 ` [Qemu-devel] " zhanghailiang
2014-08-20 13:23 ` [Qemu-trivial] " Benoît Canet
2014-08-20 13:23   ` Benoît Canet
2014-08-20 14:57 ` Michael Tokarev [this message]
2014-08-20 14:57   ` Michael Tokarev
2014-08-20 15:03   ` [Qemu-trivial] " Michael Tokarev
2014-08-20 15:03     ` [Qemu-devel] " Michael Tokarev
2014-08-21  0:42     ` [Qemu-trivial] " zhanghailiang
2014-08-21  0:42       ` [Qemu-devel] " zhanghailiang

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=53F4B776.9040508@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --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.