Re: [patch 2/7] [IPV4]: Consistency and whitespace cleanup of ip_rcv()

2005-08-20 Thread Thomas Graf
* Thomas Graf <[EMAIL PROTECTED]> 2005-08-20 15:44 > I can't see how a <= b <= c can be enforced in less than two > branches. Without using a flag risking to have 4 branches when there is no such thing as cmov that is. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body

Re: [patch 2/7] [IPV4]: Consistency and whitespace cleanup of ip_rcv()

2005-08-20 Thread Thomas Graf
* Andi Kleen <[EMAIL PROTECTED]> 2005-08-20 03:33 > On Sat, Aug 20, 2005 at 03:14:15AM +0200, Thomas Graf wrote: > > + len = ntohs(iph->tot_len); > > + if (skb->len < len || len < (iph->ihl*4)) > > + goto inhdr_error; > > If you rewrite it to something like > > u32 minlen = sk

Re: [patch 2/7] [IPV4]: Consistency and whitespace cleanup of ip_rcv()

2005-08-19 Thread Andi Kleen
On Sat, Aug 20, 2005 at 03:14:15AM +0200, Thomas Graf wrote: > + len = ntohs(iph->tot_len); > + if (skb->len < len || len < (iph->ihl*4)) > + goto inhdr_error; If you rewrite it to something like u32 minlen = skb->len; if (minlen < iph->ihl*4) m

[patch 2/7] [IPV4]: Consistency and whitespace cleanup of ip_rcv()

2005-08-19 Thread Thomas Graf
Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Index: net-2.6.14/net/ipv4/ip_input.c === --- net-2.6.14.orig/net/ipv4/ip_input.c +++ net-2.6.14/net/ipv4/ip_input.c @@ -361,6 +361,7 @@ drop: int ip_rcv(struct sk_buff *skb, struct net_