Re: [Qemu-devel] [PATCH v2 3/3] bitops: use bool

2012-07-10 Thread Blue Swirl
On Mon, Jul 9, 2012 at 7:43 AM, Markus Armbruster wrote: > blauwir...@gmail.com writes: > >> From: Blue Swirl >> >> Use 'bool' type for return value of bit test functions. > > Matter of taste. 'bool' makes sense if you think of these functions as > predicates (ugly ones, with side effects). 'in

Re: [Qemu-devel] [PATCH v2 3/3] bitops: use bool

2012-07-09 Thread Markus Armbruster
blauwir...@gmail.com writes: > From: Blue Swirl > > Use 'bool' type for return value of bit test functions. Matter of taste. 'bool' makes sense if you think of these functions as predicates (ugly ones, with side effects). 'int' makes sense if you think of them as returning the bit value (a bit

Re: [Qemu-devel] [PATCH v2 3/3] bitops: use bool

2012-07-09 Thread Peter Maydell
On 8 July 2012 20:22, wrote: > From: Blue Swirl > > Use 'bool' type for return value of bit test functions. > > Signed-off-by: Blue Swirl I'm 'meh' about the necessity for this change, but it looks safe and functionally correct to me -- all these functions are either already returning the resu

[Qemu-devel] [PATCH v2 3/3] bitops: use bool

2012-07-08 Thread blauwirbel
From: Blue Swirl Use 'bool' type for return value of bit test functions. Signed-off-by: Blue Swirl --- bitops.h |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitops.h b/bitops.h index bc99727..1cecf00 100644 --- a/bitops.h +++ b/bitops.h @@ -153,7 +153,7 @@ st