Received: from eggs.gnu.org ([2001:4830:134:3::10]:56856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiQHC-0007MU-VW for qemu-devel@nongnu.org; Sat, 03 Oct 2015 13:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiQH7-0003Jl-Va for qemu-devel@nongnu.org; Sat, 03 Oct 2015 13:07:14 -0400 Message-ID: <56100B3C.8060002@msgid.tls.msk.ru> Date: Sat, 03 Oct 2015 20:07:08 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1442231583-23535-1-git-send-email-armbru@redhat.com> <87h9mkthx7.fsf@blackfin.pond.sub.org> <5603A3B4.1020900@weilnetz.de> In-Reply-To: <5603A3B4.1020900@weilnetz.de> 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: Stefan Weil , Markus Armbruster , qemu-devel@nongnu.org, QEMU Trivial Cc: riku.voipio@iki.fi 24.09.2015 10:18, Stefan Weil wrote: > 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. Applied to -trivial, with a trivial commit message fix. Thanks! /mjt