Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[XFRM]: beet: minor cleanups

Remove unnecessary initialization/variable.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Patrick McHardy and committed by
David S. Miller
ea2f10a3 038890fe

+2 -6
+2 -6
net/ipv4/xfrm4_mode_beet.c
··· 29 29 */ 30 30 static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) 31 31 { 32 - struct iphdr *iph, *top_iph = NULL; 32 + struct iphdr *iph, *top_iph; 33 33 int hdrlen, optlen; 34 34 35 35 iph = ip_hdr(skb); ··· 73 73 struct iphdr *iph = ip_hdr(skb); 74 74 int phlen = 0; 75 75 int optlen = 0; 76 - __u8 ph_nexthdr = 0, protocol = 0; 76 + u8 ph_nexthdr = 0; 77 77 int err = -EINVAL; 78 - 79 - protocol = iph->protocol; 80 78 81 79 if (unlikely(iph->protocol == IPPROTO_BEETPH)) { 82 80 struct ip_beet_phdr *ph; ··· 107 109 iph->saddr = x->sel.saddr.a4; 108 110 if (ph_nexthdr) 109 111 iph->protocol = ph_nexthdr; 110 - else 111 - iph->protocol = protocol; 112 112 iph->check = 0; 113 113 iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); 114 114 err = 0;