]> git.proxmox.com Git - mirror_ovs.git/commit
checkpatch.py: Fix false positive on if/when/for
authorEric Garver <e@erig.me>
Thu, 16 Mar 2017 14:22:32 +0000 (10:22 -0400)
committerRussell Bryant <russell@ovn.org>
Thu, 16 Mar 2017 14:37:31 +0000 (10:37 -0400)
commit973496b9be6265e59d89d00fecc94b28e6e72816
treedbd27f76a959684ea1bbbe2e34194835a3316f9f
parenta9c838b2cc4b59da726123e06dadf38a0059604c
checkpatch.py: Fix false positive on if/when/for

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])

Fixes: 30c7ffd5ac46 ("utilities/checkpatch.py: Check for appropriate bracing")
Signed-off-by: Eric Garver <e@erig.me>
Signed-off-by: Russell Bryant <russell@ovn.org>
utilities/checkpatch.py