[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] hw/sd.c: add SD card save/load support
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] hw/sd.c: add SD card save/load support |
Date: |
Wed, 28 Dec 2011 11:50:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
On 12/27/2011 11:30 PM, Peter Maydell wrote:
> On 27 December 2011 14:13, Avi Kivity <address@hidden> wrote:
> > On 12/26/2011 04:58 PM, Peter Maydell wrote:
> >> > void sd_enable(SDState *sd, int enable)
> >> > {
> >> > - sd->enable = enable;
> >> > + sd->enable = enable ? true : false;
> >>
> >> This kind of thing is why I don't like bool :-)
> >
> > /me leaps to bool's defence:
> >
> > sd->enable = enable should work just fine.
>
> This is true, but the code snippet also illustrates that it sits
> oddly to have the internal state variable be bool when the external
> facing function's API is clearly using the traditional C style of
> int-for-booleans.
We should change those too. bool is self-documenting.
> Plus 'bool' gives me C++ flashbacks :-)
And QOM doesn't? How about
glue(glue(glue(cirrus_colorexpand_pattern_transp_, ROP_NAME), _),DEPTH)?
--
error compiling committee.c: too many arguments to function
- Re: [Qemu-devel] [PATCH 1/3] vmstate: introduce calc_size VMStateField, (continued)
[Qemu-devel] [PATCH V2 1/3] vmstate: introduce get_bufsize entry in VMStateField, Mitsyanko Igor, 2011/12/27
[Qemu-devel] [PATCH 2/3] hw/sd.c: add SD card save/load support, Mitsyanko Igor, 2011/12/26
[Qemu-devel] [PATCH 3/3] hw/: Introduce spec. ver. 2.00 compliant SD host controller, Mitsyanko Igor, 2011/12/26
[Qemu-devel] [PATCH V2 0/3] Improve SD controllers emulation, Mitsyanko Igor, 2011/12/28
[Qemu-devel] [PATCH V2 3/3] hw: Introduce spec. ver. 2.00 compliant SD host controller, Mitsyanko Igor, 2011/12/28
[Qemu-devel] [PATCH V3 0/5] Improve SD controllers emulation, Mitsyanko Igor, 2011/12/28