Received: from eggs.gnu.org ([2001:4830:134:3::10]:43080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf9FT-0004fO-5b for qemu-devel@nongnu.org; Thu, 24 Sep 2015 12:19:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf9FO-0003ec-S9 for qemu-devel@nongnu.org; Thu, 24 Sep 2015 12:19:55 -0400 From: Markus Armbruster References: <1442231583-23535-1-git-send-email-armbru@redhat.com> <87h9mkthx7.fsf@blackfin.pond.sub.org> <5603A3B4.1020900@weilnetz.de> Date: Thu, 24 Sep 2015 18:19:48 +0200 In-Reply-To: <5603A3B4.1020900@weilnetz.de> (Stefan Weil's message of "Thu, 24 Sep 2015 09:18:12 +0200") Message-ID: <87k2rfbxi3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Stefan Weil Cc: QEMU Trivial , riku.voipio@iki.fi, qemu-devel@nongnu.org Stefan Weil writes: > 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. I guess it is. For code with a maintainer, I tend to try the maintainer first. > As Eric has written, the commit message needs > a small correction: s/patchas/patch as/ Yes.