提交 10fe7d85 编写于 作者: D Denis V. Lunev 提交者: David S. Miller

[IPV4]: Remove unnecessary check for opt->is_data in ip_options_compile.

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: NDenis V. Lunev <den@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ec3c0982
...@@ -267,8 +267,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb) ...@@ -267,8 +267,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
optptr = iph + sizeof(struct iphdr); optptr = iph + sizeof(struct iphdr);
opt->is_data = 0; opt->is_data = 0;
} else { } else {
optptr = opt->is_data ? opt->__data : optptr = opt->__data;
(unsigned char *)&(ip_hdr(skb)[1]);
iph = optptr - sizeof(struct iphdr); iph = optptr - sizeof(struct iphdr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册