diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-05 19:04:04 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:34 -0400 |
commit | ea2f10a3c81724701fe6a754789eafd50b33909f (patch) | |
tree | 470ee01de060ed26817afc3a00c33101da1199ab | |
parent | 038890fed8d1fa95bbbdeb517f5710eb75fa9e2e (diff) |
[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>
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 3650e027ce70..0f7c3e30e4e6 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | 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 | int hdrlen, optlen; | 33 | int hdrlen, optlen; |
34 | 34 | ||
35 | iph = ip_hdr(skb); | 35 | iph = ip_hdr(skb); |
@@ -73,11 +73,9 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
73 | struct iphdr *iph = ip_hdr(skb); | 73 | struct iphdr *iph = ip_hdr(skb); |
74 | int phlen = 0; | 74 | int phlen = 0; |
75 | int optlen = 0; | 75 | int optlen = 0; |
76 | __u8 ph_nexthdr = 0, protocol = 0; | 76 | u8 ph_nexthdr = 0; |
77 | int err = -EINVAL; | 77 | int err = -EINVAL; |
78 | 78 | ||
79 | protocol = iph->protocol; | ||
80 | |||
81 | if (unlikely(iph->protocol == IPPROTO_BEETPH)) { | 79 | if (unlikely(iph->protocol == IPPROTO_BEETPH)) { |
82 | struct ip_beet_phdr *ph; | 80 | struct ip_beet_phdr *ph; |
83 | 81 | ||
@@ -109,8 +107,6 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
109 | iph->saddr = x->sel.saddr.a4; | 107 | iph->saddr = x->sel.saddr.a4; |
110 | if (ph_nexthdr) | 108 | if (ph_nexthdr) |
111 | iph->protocol = ph_nexthdr; | 109 | iph->protocol = ph_nexthdr; |
112 | else | ||
113 | iph->protocol = protocol; | ||
114 | iph->check = 0; | 110 | iph->check = 0; |
115 | iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); | 111 | iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); |
116 | err = 0; | 112 | err = 0; |