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

2013-08-17 Thread Philip Oakley
From: Stefan Beller stefanbel...@googlemail.com 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

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 (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion failure), because the entries is the entries are capped at an

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 sand...@crustytoothpaste.net 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 (1u31), since 506049c7df2c6 (fix 4GiB

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

2013-08-16 Thread Philip Oakley
From: Eric Sunshine sunsh...@sunshineco.com On Thu, Aug 15, 2013 at 5:34 PM, Stefan Beller stefanbel...@googlemail.com wrote: When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion

[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 optimized away

[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 (1u31), 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

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 stefanbel...@googlemail.com wrote: When checking the previous lines in that function, we can deduct that s/deduct/deduce/ hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion failure), because the entries

[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 (1u31), 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

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 stefanbel...@googlemail.com writes: When checking the previous lines in that function, we can deduct that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion failure), because the entries is capped at

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 stefanbel...@googlemail.com wrote: When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion failure), because entries is capped at an upper

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 Philip Oakley
From: Stefan Beller stefanbel...@googlemail.com When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion failure), because entries is capped at an upper bound of 0xfffeU, so hsize

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 stefanbel...@googlemail.com writes: When checking the previous lines in that function, we can deduct that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta

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 stefanbel...@googlemail.com wrote: When checking the previous lines in that function, we can deduce that hsize must always be smaller than (1u31), since 506049c7df2c6 (fix 4GiB source delta assertion