[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] Use g_new() & friends where that makes obvi
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] Use g_new() & friends where that makes obvious sense |
Date: |
Fri, 31 Jan 2014 13:13:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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~