From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKGTF-0002jr-1B for qemu-devel@nongnu.org; Wed, 20 Aug 2014 20:43:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKGT7-00010X-Tr for qemu-devel@nongnu.org; Wed, 20 Aug 2014 20:43:16 -0400 Message-ID: <53F5408B.3080908@huawei.com> Date: Thu, 21 Aug 2014 08:42:51 +0800 From: zhanghailiang MIME-Version: 1.0 References: <1408437017-15648-1-git-send-email-zhang.zhanghailiang@huawei.com> <53F4B776.9040508@msgid.tls.msk.ru> <53F4B8DE.4050508@msgid.tls.msk.ru> In-Reply-To: <53F4B8DE.4050508@msgid.tls.msk.ru> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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: Michael Tokarev Cc: qemu-trivial@nongnu.org, luonengjun@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com On 2014/8/20 23:03, Michael Tokarev wrote: > 20.08.2014 18:57, Michael Tokarev пишет: >> 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! > > ..And with removal of the corresponding #ifdef HAVE_STRDUP from slirp/misc.h. > > /mjt > > OK! Thanks. zhanghailiang