Re: [Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-13 Thread Uri Lublin
On 01/07/2014 02:47 PM, Christophe Fergeau wrote: Hey, On Mon, Jan 06, 2014 at 03:35:24PM +0200, Uri Lublin wrote: On 01/06/2014 01:22 PM, Christophe Fergeau wrote: find_model_params() is first dereferencing nbuckets when setting it to 0, and then it checks it for NULL. The NULL-check will nev

Re: [Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-07 Thread Christophe Fergeau
On Tue, Jan 07, 2014 at 01:47:12PM +0100, Christophe Fergeau wrote: > Hey, > > On Mon, Jan 06, 2014 at 03:35:24PM +0200, Uri Lublin wrote: > > On 01/06/2014 01:22 PM, Christophe Fergeau wrote: > > >find_model_params() is first dereferencing nbuckets when setting > > >it to 0, and then it checks it

Re: [Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-07 Thread Christophe Fergeau
Hey, On Mon, Jan 06, 2014 at 03:35:24PM +0200, Uri Lublin wrote: > On 01/06/2014 01:22 PM, Christophe Fergeau wrote: > >find_model_params() is first dereferencing nbuckets when setting > >it to 0, and then it checks it for NULL. The NULL-check will never trigger > >as if the pointer was NULL, we'd

Re: [Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-06 Thread Uri Lublin
On 01/06/2014 01:22 PM, Christophe Fergeau wrote: find_model_params() is first dereferencing nbuckets when setting it to 0, and then it checks it for NULL. The NULL-check will never trigger as if the pointer was NULL, we'd crash when we dereference it. This commit removes the redundant test, but

[Spice-devel] [spice-common 7/8] quic: Remove test which is always TRUE

2014-01-06 Thread Christophe Fergeau
find_model_params() is first dereferencing nbuckets when setting it to 0, and then it checks it for NULL. The NULL-check will never trigger as if the pointer was NULL, we'd crash when we dereference it. This commit removes the redundant test, but adds an assert so that we catch this condition if it