Received: from eggs.gnu.org ([2001:4830:134:3::10]:56496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiQFT-0006D3-HF for qemu-devel@nongnu.org; Sat, 03 Oct 2015 13:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiQFQ-0002Cv-CA for qemu-devel@nongnu.org; Sat, 03 Oct 2015 13:05:27 -0400 Message-ID: <56100AD3.20707@msgid.tls.msk.ru> Date: Sat, 03 Oct 2015 20:05:23 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1442231543-23446-1-git-send-email-armbru@redhat.com> <87oagrbxjw.fsf@blackfin.pond.sub.org> In-Reply-To: <87oagrbxjw.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] rocker: 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 Cc: qemu-trivial@nongnu.org, sfeldma@gmail.com, jiri@resnulli.us 24.09.2015 19:18, Markus Armbruster wrote: > Michael, could you take this one through trivial? Assuming Scott and > Jiri don't mind, and with s/patchas/patch as/ in the commit message. > > 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, thanks! /mjt