Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Gerd Hoffmann
On Do, 2015-06-18 at 06:45 -0400, Frediano Ziglio wrote: > > On Do, 2015-06-18 at 05:58 -0400, Frediano Ziglio wrote: > > > For the same reason there is the v >= l test. > > > The v >= l test state that the value can be out of range so it not always > > > a > > > constant in the range. > > > Addi

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Frediano Ziglio
> On Do, 2015-06-18 at 05:58 -0400, Frediano Ziglio wrote: > > For the same reason there is the v >= l test. > > The v >= l test state that the value can be out of range so it not always a > > constant in the range. > > Adding the v < 0 check for every invalid value. As these are executed only >

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Gerd Hoffmann
On Do, 2015-06-18 at 05:58 -0400, Frediano Ziglio wrote: > For the same reason there is the v >= l test. > The v >= l test state that the value can be out of range so it not always a > constant in the range. > Adding the v < 0 check for every invalid value. As these are executed only > for loggin

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-18 Thread Frediano Ziglio
For the same reason there is the v >= l test. The v >= l test state that the value can be out of range so it not always a constant in the range. Adding the v < 0 check for every invalid value. As these are executed only for logging should not be a performance penalty. I also hope the compiler is

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Check value for invalid negative values

2015-06-17 Thread Michael Tokarev
11.06.2015 16:17, Frediano Ziglio wrote: > In qxl_v2n check that value is not negative. Why do you think it is necessary? Thanks, /mjt > Signed-off-by: Frediano Ziglio > --- > hw/display/qxl-logger.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/display/qxl-logg