Re: [PATCH 5/7] Add API for string-specific memory pool
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- May 30, 2010, 16:52 UTC
- Message-ID
- <AANLkTikiuFeGkDizLTmB_3AQgiU9vL3C_Tgxg_lf4LgL@mail.gmail.com>
- In-Reply-To
- <20100529113800.GA7925@progeny.tock>
Hi again,
Jonathan Nieder wrote:
Show 9 quoted lines
>> +static int node_indentity_cmp(node_t *a, node_t *b)
>> +{
>> + int r = node_value_cmp(a, b);
>> + return r ? r : (((uintptr_t) a) > ((uintptr_t) b))
>> + - (((uintptr_t) a) < ((uintptr_t) b));
>
> nitpick: could use fewer parentheses.
>
> return r ? r : (((uintptr_t) a > (uintptr_t) b) - ...Actually, this triggers a compiler error on GCC: string_pool.c:34: warning: comparisons like ‘X<=Y<=Z’ do not have their mathematical meaning
-- Ram