Skip to content

Commit 10fe7d8

Browse files
dlunevdavem330
authored andcommitted
[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>
1 parent ec3c098 commit 10fe7d8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎net/ipv4/ip_options.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb)
267267
optptr = iph + sizeof(struct iphdr);
268268
opt->is_data = 0;
269269
} else {
270-
optptr = opt->is_data ? opt->__data :
271-
(unsigned char *)&(ip_hdr(skb)[1]);
270+
optptr = opt->__data;
272271
iph = optptr - sizeof(struct iphdr);
273272
}
274273

0 commit comments

Comments
 (0)