On 12/27/2011 11:30 PM, Peter Maydell wrote: > On 27 December 2011 14:13, Avi Kivity <a...@redhat.com> 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