From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH2w6-00013O-Jc for qemu-devel@nongnu.org; Thu, 20 Oct 2011 20:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RH2w4-0000ER-Ea for qemu-devel@nongnu.org; Thu, 20 Oct 2011 20:26:10 -0400 Received: from auth.b.painless.aaisp.net.uk ([90.155.4.48]:57957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RH2w4-0000Dl-96 for qemu-devel@nongnu.org; Thu, 20 Oct 2011 20:26:08 -0400 Received: from zubnet.me.uk ([81.187.243.246] helo=circe) by b.painless.aaisp.net.uk with esmtp (Exim 4.72) (envelope-from ) id 1RH2w2-0008AN-6R for qemu-devel@nongnu.org; Fri, 21 Oct 2011 01:26:06 +0100 Date: Fri, 21 Oct 2011 01:26:03 +0100 From: Stuart Brady Message-ID: <20111021002603.GA6139@zubnet.me.uk> References: <1319097820-4788-1-git-send-email-sdb@zubnet.me.uk> <1319097820-4788-5-git-send-email-sdb@zubnet.me.uk> <4E9FE45D.5020802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E9FE45D.5020802@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/5] Convert remaining calls to g_malloc(sizeof(type)) to g_new() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Oct 20, 2011 at 11:05:33AM +0200, Paolo Bonzini wrote: > On 10/20/2011 10:03 AM, Stuart Brady wrote: > >Coccinelle did not match these when matching assignments involving an > >expression corresponding to the type used for determining the size to > >allocate. > > They all look okay, perhaps the include path you passed to > Coccinelle is incomplete? Ah, good point! I'm not sure what include dirs are needed, though... anyone have any advice? Blue Swirl, I gather you're one of the few other people to have used Coccinelle with Qemu's source... > Reviewed-by: Paolo Bonzini > > but would be nicer if you fixed the problem. Agreed... I'm new to Coccinelle, but I'll experiment and see if I can produce a better patch. After applying my patch series, it seems there are still some additional calls that need converting, so I can readily believe that the semantic patches I've used can be improved! Cheers, -- Stuart