RE: ip_set_hash_netnet.c:62: possible typo ?

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

 



On Mon, 25 Nov 2013, David Binderman wrote:

> >> 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 ?
> >
> > Yes, you are completely right. I'm going to check why the testsuite did
> > not catch it.
> 
> Maybe because the function is dead code ?
> 
> I couldn't find any callers of it. Maybe that's another bug and
> it should be called from somewhere else in the same file.

No, it's not dead code, the common part (ip_set_hash_gen.h) "calls" it at 
several places. The tests were insufficient to check the case.

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxxxxxx
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
          H-1525 Budapest 114, POB. 49, Hungary
--
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