aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-22 19:35:00 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-22 19:35:00 -0400
commit10fe7d85e2e4042f703a10bed4123f2105eadad2 (patch)
tree7698a8024571f2dd61559bad298ac397445ea693
parentec3c0982a2dd1e671bad8e9d26c28dcba0039d87 (diff)
[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: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/ip_options.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index df93a9c2efda..7e94bf850a07 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -267,8 +267,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
267 optptr = iph + sizeof(struct iphdr); 267 optptr = iph + sizeof(struct iphdr);
268 opt->is_data = 0; 268 opt->is_data = 0;
269 } else { 269 } else {
270 optptr = opt->is_data ? opt->__data : 270 optptr = opt->__data;
271 (unsigned char *)&(ip_hdr(skb)[1]);
272 iph = optptr - sizeof(struct iphdr); 271 iph = optptr - sizeof(struct iphdr);
273 } 272 }
274 273