Re: [PATCH 3/9] convert "oidcmp() == 0" to oideq()

2018-08-27 Thread Derrick Stolee
On 8/27/2018 8:31 AM, Derrick Stolee wrote: On 8/25/2018 4:36 AM, Jeff King wrote: On Sat, Aug 25, 2018 at 04:07:15AM -0400, Jeff King wrote: diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci index 5869979be7..548c02336d 100644 ---

Re: [PATCH 3/9] convert "oidcmp() == 0" to oideq()

2018-08-27 Thread Derrick Stolee
On 8/25/2018 4:36 AM, Jeff King wrote: On Sat, Aug 25, 2018 at 04:07:15AM -0400, Jeff King wrote: diff --git a/contrib/coccinelle/object_id.cocci b/contrib/coccinelle/object_id.cocci index 5869979be7..548c02336d 100644 --- a/contrib/coccinelle/object_id.cocci +++

Re: [PATCH 3/9] convert "oidcmp() == 0" to oideq()

2018-08-25 Thread Jeff King
On Sat, Aug 25, 2018 at 04:07:15AM -0400, Jeff King wrote: > diff --git a/contrib/coccinelle/object_id.cocci > b/contrib/coccinelle/object_id.cocci > index 5869979be7..548c02336d 100644 > --- a/contrib/coccinelle/object_id.cocci > +++ b/contrib/coccinelle/object_id.cocci > @@ -108,3 +108,9 @@

[PATCH 3/9] convert "oidcmp() == 0" to oideq()

2018-08-25 Thread Jeff King
Using the more restrictive oideq() should, in the long run, give the compiler more opportunities to optimize these callsites. For now, this conversion should be a complete noop with respect to the generated code. The result is also perhaps a little more readable, as it avoids the "zero is equal"