From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7Qj-0001GY-CC for qemu-devel@nongnu.org; Wed, 20 Aug 2014 11:04:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK7Qd-0007j3-5M for qemu-devel@nongnu.org; Wed, 20 Aug 2014 11:04:05 -0400 Message-ID: <53F4B8DE.4050508@msgid.tls.msk.ru> Date: Wed, 20 Aug 2014 19:03:58 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1408437017-15648-1-git-send-email-zhang.zhanghailiang@huawei.com> <53F4B776.9040508@msgid.tls.msk.ru> In-Reply-To: <53F4B776.9040508@msgid.tls.msk.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8] slirp/misc: Use the GLib memory allocation APIs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, luonengjun@huawei.com, peter.huangpeng@huawei.com 20.08.2014 18:57, Michael Tokarev =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > 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. >=20 > I also will remove the HAVE_STRDUP define from slirp_config.h -- > it is no longer needed there. >=20 > Applied to -trivial (with the above addition), thank you! ..And with removal of the corresponding #ifdef HAVE_STRDUP from slirp/mis= c.h. /mjt