Re: [Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Christophe de Dinechin
> On 27 Feb 2017, at 17:10, Frediano Ziglio wrote: > > On 27 Feb 2017, at 13:12, Christophe Fergeau > wrote: > > On Mon, Feb 27, 2017 at 06:58:47AM -0500, Frediano Ziglio wrote: > > Using X == TRUE is fragile, since the input value is a uint8_t. It would be > surpr

Re: [Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Frediano Ziglio
> > On 27 Feb 2017, at 13:12, Christophe Fergeau < cferg...@redhat.com > wrote: > > > On Mon, Feb 27, 2017 at 06:58:47AM -0500, Frediano Ziglio wrote: > > > > > Using X == TRUE is fragile, since the input value is a uint8_t. It > > > > would > > > > be > > > > > > > > > > surprising if the v

Re: [Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Christophe de Dinechin
> On 27 Feb 2017, at 13:12, Christophe Fergeau wrote: > > On Mon, Feb 27, 2017 at 06:58:47AM -0500, Frediano Ziglio wrote: >>> >>> Using X == TRUE is fragile, since the input value is a uint8_t. It would be >>> surprising if the value was set to 2 or 0xFF and the test failed. >>> >>> Signed-of

Re: [Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Christophe Fergeau
On Mon, Feb 27, 2017 at 06:58:47AM -0500, Frediano Ziglio wrote: > > > > Using X == TRUE is fragile, since the input value is a uint8_t. It would be > > surprising if the value was set to 2 or 0xFF and the test failed. > > > > Signed-off-by: Christophe de Dinechin > > Acked-by: Frediano Ziglio

Re: [Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Frediano Ziglio
> > Using X == TRUE is fragile, since the input value is a uint8_t. It would be > surprising if the value was set to 2 or 0xFF and the test failed. > > Signed-off-by: Christophe de Dinechin Acked-by: Frediano Ziglio > --- > server/dcc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletion

[Spice-devel] [PATCH] Remove X == TRUE tests for non-boolean values

2017-02-27 Thread Christophe de Dinechin
Using X == TRUE is fragile, since the input value is a uint8_t. It would be surprising if the value was set to 2 or 0xFF and the test failed. Signed-off-by: Christophe de Dinechin --- server/dcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/dcc.c b/server/dcc.c