From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XJdv4-0004Dj-Jb for mharc-qemu-trivial@gnu.org; Tue, 19 Aug 2014 03:33:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJdux-00041i-9n for qemu-trivial@nongnu.org; Tue, 19 Aug 2014 03:33:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJdur-0000QQ-5i for qemu-trivial@nongnu.org; Tue, 19 Aug 2014 03:33:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:35606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJdua-0000OX-HA; Tue, 19 Aug 2014 03:32:56 -0400 Received: from [192.168.88.2] (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id A86B543B25; Tue, 19 Aug 2014 11:32:55 +0400 (MSK) Message-ID: <53F2FDA7.6040902@msgid.tls.msk.ru> Date: Tue, 19 Aug 2014 11:32:55 +0400 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 MIME-Version: 1.0 To: zhanghailiang References: <1408348310-6628-1-git-send-email-zhang.zhanghailiang@huawei.com> <53F1E445.1060301@msgid.tls.msk.ru> <53F2FD31.1010102@huawei.com> In-Reply-To: <53F2FD31.1010102@huawei.com> X-Enigmail-Version: 1.6 OpenPGP: id=804465C5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 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() X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 07:33:25 -0000 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJduk-0003lt-UI for qemu-devel@nongnu.org; Tue, 19 Aug 2014 03:33:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJdua-0000Oj-V1 for qemu-devel@nongnu.org; Tue, 19 Aug 2014 03:33:06 -0400 Message-ID: <53F2FDA7.6040902@msgid.tls.msk.ru> Date: Tue, 19 Aug 2014 11:32:55 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1408348310-6628-1-git-send-email-zhang.zhanghailiang@huawei.com> <53F1E445.1060301@msgid.tls.msk.ru> <53F2FD31.1010102@huawei.com> In-Reply-To: <53F2FD31.1010102@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v7] slirp/misc: Use g_malloc() instead of malloc() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang Cc: qemu-trivial@nongnu.org, jan.kiszka@siemens.com, luonengjun@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@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