From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbSOv-00023K-RJ for qemu-devel@nongnu.org; Mon, 14 Sep 2015 07:58:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbSOC-0007C2-66 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 07:57:44 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbSOB-0007Bt-Vn for qemu-devel@nongnu.org; Mon, 14 Sep 2015 07:57:40 -0400 Received: by wicge5 with SMTP id ge5so139250257wic.0 for ; Mon, 14 Sep 2015 04:57:39 -0700 (PDT) Date: Mon, 14 Sep 2015 13:57:36 +0200 From: Jiri Pirko Message-ID: <20150914115736.GA2111@nanopsycho.orion> References: <1442231543-23446-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442231543-23446-1-git-send-email-armbru@redhat.com> 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 Cc: sfeldma@gmail.com, qemu-devel@nongnu.org Mon, Sep 14, 2015 at 01:52:23PM CEST, armbru@redhat.com wrote: >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. ^ typo :) Other than that: Acked-by: Jiri Pirko