From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9JX4-0004L4-Lp for qemu-devel@nongnu.org; Fri, 31 Jan 2014 14:13:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9JWz-0008AR-34 for qemu-devel@nongnu.org; Fri, 31 Jan 2014 14:13:42 -0500 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:54867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9JWy-0008AN-Um for qemu-devel@nongnu.org; Fri, 31 Jan 2014 14:13:37 -0500 Received: by mail-qa0-f43.google.com with SMTP id o15so6933187qap.30 for ; Fri, 31 Jan 2014 11:13:36 -0800 (PST) Sender: Richard Henderson Message-ID: <52EBF5DC.5030505@twiddle.net> Date: Fri, 31 Jan 2014 13:13:32 -0600 From: Richard Henderson MIME-Version: 1.0 References: <1391183604-21621-1-git-send-email-armbru@redhat.com> <1391183604-21621-3-git-send-email-armbru@redhat.com> <52EBD8F9.4080800@redhat.com> In-Reply-To: <52EBD8F9.4080800@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] Use g_new() & friends where that makes obvious sense List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Markus Armbruster , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com, aliguori@amazon.com, agraf@suse.de On 01/31/2014 11:10 AM, Eric Blake wrote: > >> > @@ -658,7 +658,7 @@ int qcow2_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab) >> > return s->nb_snapshots; >> > } >> > >> > - sn_tab = g_malloc0(s->nb_snapshots * sizeof(QEMUSnapshotInfo)); >> > + sn_tab = g_new0(QEMUSnapshotInfo, s->nb_snapshots); >> > for(i = 0; i < s->nb_snapshots; i++) { > Should checkpatch.pl care about the spacing after 'for'? Then again, > it's unrelated to your conversion, so omitting a whitespace cleanup from > this patch doesn't hurt. > checkpatch.pl won't check lines that aren't touched, as you see here. r~