qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22


From: Stuart Brady
Subject: Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense)
Date: Thu, 3 Sep 2009 13:05:44 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, Aug 26, 2009 at 07:08:55PM +0300, Avi Kivity wrote:
> Or better, NEW() and NEW_ARRAY().

ISTR this being discussed before, but there was some disagreement
regarding whether it is preferable to have:

   QEMU_NEW(ptr);

or:

   ptr = QEMU_NEW(type);

If the type is incorrect, the latter form would still at least yield a
warning (and now therefore a build failure).  It seems slightly more 
readable to me, so that's the form that I would have preferred...

Is there any reason that this wouldn't be accepted, or should I start
submitting patches?

Cheers,
-- 
Stuart Brady




reply via email to

[Prev in Thread] Current Thread [Next in Thread]