[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH target-arm] display: avoid multi-statement macro |
Date: |
Fri, 24 Jan 2014 18:26:27 +0000 |
On 24 January 2014 17:53, Paolo Bonzini <address@hidden> wrote:
> Il 24/01/2014 18:52, Peter Maydell ha scritto:
>> On 24 January 2014 17:47, Paolo Bonzini <address@hidden> wrote:
>>> --- a/hw/display/blizzard_template.h
>>> +++ b/hw/display/blizzard_template.h
>>> @@ -21,21 +21,21 @@
>>> #define SKIP_PIXEL(to) to += deststep
>>> #if DEPTH == 8
>>> # define PIXEL_TYPE uint8_t
>>> -# define COPY_PIXEL(to, from) *to = from; SKIP_PIXEL(to)
>>> +# define COPY_PIXEL(to, from) *to = from, SKIP_PIXEL(to)
>>
>>
>> Why not use the standard do { ... } while(0) idiom ?
>
>
> I figured that this would make the patch easier to review, but I can use "do
> {...} while(0)" too (either directly or as a follow up).
I'd prefer do ... while(0), just as a single patch fix.
I'm not convinced the average QEMU programmer could tell
you whether comma is a sequence point without going and
looking it up :-)
thanks
-- PMM