Received: from eggs.gnu.org ([2001:4830:134:3::10]:35637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf0nN-00087d-Ui for qemu-devel@nongnu.org; Thu, 24 Sep 2015 03:18:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf0nK-0000YU-PT for qemu-devel@nongnu.org; Thu, 24 Sep 2015 03:18:21 -0400 Received: from [2a03:4000:1::4e2f:c7ac:d] (port=43064 helo=v220110690675601.yourvserver.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf0nK-0000Xv-J3 for qemu-devel@nongnu.org; Thu, 24 Sep 2015 03:18:18 -0400 Message-ID: <5603A3B4.1020900@weilnetz.de> Date: Thu, 24 Sep 2015 09:18:12 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1442231583-23535-1-git-send-email-armbru@redhat.com> <87h9mkthx7.fsf@blackfin.pond.sub.org> In-Reply-To: <87h9mkthx7.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org, QEMU Trivial Cc: riku.voipio@iki.fi -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Am 24.09.2015 um 09:06 schrieb Markus Armbruster: > Ping? > > Markus Armbruster writes: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also >> safer, for two reasons. One, it catches multiplication >> overflowing size_t. Two, it returns T * rather than void *, >> which lets the compiler catch more type errors. >> >> This commit only touches allocations with size arguments of the >> form sizeof(T). Same Coccinelle semantic patchas in commit >> b45c03f. >> >> Signed-off-by: Markus Armbruster --- >> linux-user/elfload.c | 2 +- linux-user/main.c | 2 +- >> linux-user/syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 >> deletions(-) Reviewed-by: Stefan Weil This patch is trivial enough for qemu-trivial. As Eric has written, the commit message needs a small correction: s/patchas/patch as/ Regards Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWA6OuAAoJEOCMIdVndFCt6Q8P/R6kKihtOvr17lL3Av117n1z YPv6Tfa9jy1fd3qaeIMhXgm63CNTWTGU4o0A9/k3thqiD9kYVpqeZkd7gt1gE6uU QR/eReEMZNr+5AnkYnCmZ8wr5upd4RWUjCvbGSUpFgb1ui+VtwZ08XzCVehQfY39 2S6EWxR/I7ETxzue+AFZak9w4QqVF7IQmw7CPkeTCD/himdCpyeGxL9dYQnyfEdW mQeXUR2eipaqwIt1b6JkwQCU78rY2D/OLVDipZK9M4BSmJQWS2BsLboc+VC59bN9 JkVrKgSbuciqBMXDudY71qv9XO/wyM8MwnDM5GY7V9N1PoRVcg2mvSCRKq9lP82K V0Sb6n1j9/AgM3ngnLZqkiVYkeFrnccIkiKCJvmDnDP1ClC8Cy5V1wkPzk7TJgTK 4xvuI3kfWPIzbphWzZtcCstJKYaO5ydrEGGNGko37A6s65oE+gIhyrv/KSIhix+H n7KMOILY4wuk7UYoIgK6cvKL6QsVyhw0lR+RIR8p33ofAj20HylQng38h6spr50F XTl3J38ApbyxNhw+EJHXXwj14YJFrZTwN8C0X49UHkSD4wqR4lH+2kdNUYIYJJHR Zx+HkJj/8hLQq14WjtgZlNQ7noAck/yh9Rvyu54v6yfx1RAhNkDbiysQKgqkWzNM U5ro2khoY2BrI7Bdq29H =/Z+4 -----END PGP SIGNATURE-----