[ovs-dev] [PATCH] checkpatch.py: Fix false positive on if/when/for

Aaron Conole aconole at redhat.com
Thu Mar 16 14:49:17 UTC 2017


Russell Bryant <russell at ovn.org> writes:

> On Thu, Mar 16, 2017 at 10:37 AM, Aaron Conole <aconole at redhat.com> wrote:
>> Eric Garver <e at erig.me> writes:
>>
>>> We need to use == instead of the is operator. If you're unlucky it may
>>> fail because they're not exactly the same object, but hold the same
>>> value.
>>>
>>> Example false positive:
>>>
>>> E(120): Inappropriate bracing around statement
>>>
>>> +            if (0 != nl_attr_get_u8(vxlan[IFLA_VXLAN_LEARNING])
>>
>> I count an unbalanced brace.  There may be something wrong, but at least
>> from the example, I don't see it.
>>
>> Can you include a bit more context?  Perhaps the hunk that failed?
>
> I applied this to master before seeing your reply and request for more
> info.  Sorry about that.
>
> I applied this because I think the change is correct, but I agree that
> the example appears to indeed be imbalanced.

+1 - I do agree with the change, fwiw :)


More information about the dev mailing list