Re: [PATCH 5/7] Add API for string-specific memory pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again,

Jonathan Nieder wrote:
>> +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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]