]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4]: Remove unnecessary check for opt->is_data in ip_options_compile.
authorDenis V. Lunev <den@openvz.org>
Sat, 22 Mar 2008 23:35:00 +0000 (16:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Mar 2008 23:35:00 +0000 (16:35 -0700)
There is the only way to reach ip_options compile with opt != NULL:

ip_options_get_finish
    opt->is_data = 1;
    ip_options_compile(opt, NULL)

So, checking for is_data inside opt != NULL branch is not needed.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_options.c

index df93a9c2efda9ec06060ede500d638ff724d6a23..7e94bf850a07fcd88db21498c05cf864523ff4ac 100644 (file)
@@ -267,8 +267,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
                optptr = iph + sizeof(struct iphdr);
                opt->is_data = 0;
        } else {
-               optptr = opt->is_data ? opt->__data :
-                                       (unsigned char *)&(ip_hdr(skb)[1]);
+               optptr = opt->__data;
                iph = optptr - sizeof(struct iphdr);
        }