mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 12:30:53 +07:00
[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>
This commit is contained in:
parent
ec3c0982a2
commit
10fe7d85e2
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user