Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-16 Thread Philip Oakley
From: "Stefan Beller" The code sequence ' (1u << i) < hsize && i < 31 ' is a multi step process, whose first step requires that 'i' is already less that 31, otherwise the result (1u << i) is undefined (and 'undef_val < hsize' can therefore be assumed to be 'false'), and so the later test i <

[PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-16 Thread Stefan Beller
The code sequence ' (1u << i) < hsize && i < 31 ' is a multi step process, whose first step requires that 'i' is already less that 31, otherwise the result (1u << i) is undefined (and 'undef_val < hsize' can therefore be assumed to be 'false'), and so the later test i < 31 can always be optimiz

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-16 Thread Philip Oakley
From: "Eric Sunshine" On Thu, Aug 15, 2013 at 5:34 PM, Stefan Beller wrote: When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u<<31), since 506049c7df2c6 (fix >4GiB source delta assertion failure), because entries is capped at an upper bo

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-16 Thread Eric Sunshine
On Fri, Aug 16, 2013 at 7:43 AM, brian m. carlson wrote: > On Thu, Aug 15, 2013 at 09:37:40PM +0200, Stefan Beller wrote: >> When checking the previous lines in that function, we can deduct that >> hsize must always be smaller than (1u<<31), since 506049c7df2c6 >> (fix >4GiB source delta assertion

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-16 Thread brian m. carlson
On Thu, Aug 15, 2013 at 09:37:40PM +0200, Stefan Beller wrote: > When checking the previous lines in that function, we can deduct that > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > (fix >4GiB source delta assertion failure), because the entries is the entries are > capped at

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Nicolas Pitre
On Thu, 15 Aug 2013, Eric Sunshine wrote: > On Thu, Aug 15, 2013 at 5:34 PM, Stefan Beller > wrote: > > When checking the previous lines in that function, we can deduce that > > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > > (fix >4GiB source delta assertion failure), because

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Nicolas Pitre
On Thu, 15 Aug 2013, Junio C Hamano wrote: > Forwarding to the area expert... > > Stefan Beller writes: > > > When checking the previous lines in that function, we can deduct that > > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > > (fix >4GiB source delta assertion failure),

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Philip Oakley
From: "Stefan Beller" When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u<<31), since 506049c7df2c6 (fix >4GiB source delta assertion failure), because entries is capped at an upper bound of 0xfffeU, so hsize contains a maximum value of

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Stefan Beller
Nicolas, I am sorry for not including you in the first mail. Just before Junio included you, there were these 2 mails http://www.mail-archive.com/git@vger.kernel.org/msg34101.html http://www.mail-archive.com/git@vger.kernel.org/msg34103.html Stefan On 08/15/2013 11:43 PM, Junio C Hamano wrote: >

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Eric Sunshine
On Thu, Aug 15, 2013 at 5:34 PM, Stefan Beller wrote: > When checking the previous lines in that function, we can deduce that > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > (fix >4GiB source delta assertion failure), because entries is > capped at an upper bound of 0xfffeU

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Junio C Hamano
Forwarding to the area expert... Stefan Beller writes: > When checking the previous lines in that function, we can deduct that > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > (fix >4GiB source delta assertion failure), because the entries is > capped at an upper bound of 0xff

[PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Stefan Beller
When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u<<31), since 506049c7df2c6 (fix >4GiB source delta assertion failure), because entries is capped at an upper bound of 0xfffeU, so hsize contains a maximum value of 0x3fff, which is sma

Re: [PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Eric Sunshine
On Thu, Aug 15, 2013 at 3:37 PM, Stefan Beller wrote: > When checking the previous lines in that function, we can deduct that s/deduct/deduce/ > hsize must always be smaller than (1u<<31), since 506049c7df2c6 > (fix >4GiB source delta assertion failure), because the entries is s/the entries/ent

[PATCH] create_delta_index: simplify condition always evaluating to true

2013-08-15 Thread Stefan Beller
When checking the previous lines in that function, we can deduct that hsize must always be smaller than (1u<<31), since 506049c7df2c6 (fix >4GiB source delta assertion failure), because the entries is capped at an upper bound of 0xfffeU, so hsize contains a maximum value of 0x3fff, which is