Re: [PATCH 2.6.17] net/ipv6/udp.c: remove duplicate udp_get_port code

2006-08-16 Thread gerrit
Hi Yoshifuji, | > +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | > + else if(sk->sk_family == PF_INET6 && | > + ipv6_rcv_saddr_equal(sk, sk2) ) | > + goto fail; | > +

Re: [PATCH 2.6.17] net/ipv6/udp.c: remove duplicate udp_get_port code

2006-08-16 Thread YOSHIFUJI Hideaki / 吉藤英明
Hello. In article <[EMAIL PROTECTED]> (at Wed, 16 Aug 2006 08:46:48 +0100), [EMAIL PROTECTED] says: > UDPv4 and UDPv6 use an almost identical version of the get_port function, > which is unnecessary since the (long) code differs in only one if-statement. : : > +#if defined(CONFIG_IPV6) || defin

[PATCH 2.6.17] net/ipv6/udp.c: remove duplicate udp_get_port code

2006-08-16 Thread gerrit
UDPv4 and UDPv6 use an almost identical version of the get_port function, which is unnecessary since the (long) code differs in only one if-statement. By disentangling the if statement and adding v4/v6 checks appropriately, this code duplication can be removed and further * udp_port_rover can s