From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zf0nV-0008G3-F7 for mharc-qemu-trivial@gnu.org; Thu, 24 Sep 2015 03:18:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf0nO-00087f-KC for qemu-trivial@nongnu.org; Thu, 24 Sep 2015 03:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf0nL-0000Yv-DX for qemu-trivial@nongnu.org; Thu, 24 Sep 2015 03:18:22 -0400 Received: from v220110690675601.yourvserver.net ([37.221.199.173]:43323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf0nL-0000Ya-7c for qemu-trivial@nongnu.org; Thu, 24 Sep 2015 03:18:19 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id D683411810AD; Thu, 24 Sep 2015 09:18:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TAoeEsstzoue; Thu, 24 Sep 2015 09:18:14 +0200 (CEST) Received: from edv32.bib.uni-mannheim.de (mobile-195-224.wlan.uni-mannheim.de [134.155.195.224]) by v220110690675601.yourvserver.net (Postfix) with ESMTPSA id 29D4B11810A3; Thu, 24 Sep 2015 09:18:13 +0200 (CEST) Message-ID: <5603A3B4.1020900@weilnetz.de> Date: Thu, 24 Sep 2015 09:18:12 +0200 From: Stefan Weil User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Markus Armbruster , qemu-devel@nongnu.org, QEMU Trivial 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.221.199.173 Cc: riku.voipio@iki.fi Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user: Use g_new() & friends where that makes obvious sense 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: Thu, 24 Sep 2015 07:18:28 -0000 -----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----- From mboxrd@z Thu Jan 1 00:00:00 1970 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-----