ip_set_hash_netnet.c:62: possible typo ?

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

 



Hello there,

I just ran the static analyser "cppcheck" over the source
code of linux-3.13-rc1. It said

[linux-3.13-rc1/net/netfilter/ipset/ip_set_hash_netnet.c:62] -> [linux-3.13-rc1/net/netfilter/ipset/ip_set_hash_netnet.c:62]: (style) Same expression on both sides of '=='.

Source code is

static inline bool
hash_netnet4_data_equal(const struct hash_netnet4_elem *ip1,
             const struct hash_netnet4_elem *ip2,
             u32 *multi)
{
    return ip1->ipcmp == ip2->ipcmp &&
           ip2->ccmp == ip2->ccmp;
}

Maybe 

static inline bool
hash_netnet4_data_equal(const struct hash_netnet4_elem *ip1,
             const struct hash_netnet4_elem *ip2,
             u32 *multi)
{
    return ip1->ipcmp == ip2->ipcmp &&
           ip1->ccmp == ip2->ccmp;
}

would be better code ?

Regards

David Binderman 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux