Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Aug 11, 2016 at 06:41:36PM +0200, Lluís Vilanova wrote: >> Daniel P Berrange writes: >> >> > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: >> >> An explicit if/else is clearer than arithmetic assuming #true is 1, >> >> while the compiler shoul

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 06:41:36PM +0200, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: > >> An explicit if/else is clearer than arithmetic assuming #true is 1, > >> while the compiler should be able to generate just as opti

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: >> An explicit if/else is clearer than arithmetic assuming #true is 1, >> while the compiler should be able to generate just as optimal code. >> >> Signed-off-by: Lluís Vilanova >> --- >> stubs/trace-cont

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: > An explicit if/else is clearer than arithmetic assuming #true is 1, > while the compiler should be able to generate just as optimal code. > > Signed-off-by: Lluís Vilanova > --- > stubs/trace-control.c |9 +++-- > trace/c

[Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
An explicit if/else is clearer than arithmetic assuming #true is 1, while the compiler should be able to generate just as optimal code. Signed-off-by: Lluís Vilanova --- stubs/trace-control.c |9 +++-- trace/control-target.c | 18 ++ 2 files changed, 21 insertions(+),