summaryrefslogtreecommitdiffstats
path: root/net/ipv4/esp4.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-30 14:53:48 +0000
committerSteffen Klassert <steffen.klassert@secunet.com>2018-02-13 13:59:03 +0100
commit60aa80460da115216070082b4ab686b9e37c86ef (patch)
tree318a2a206a067e0678b381f9e0525c1a245299df /net/ipv4/esp4.c
parentcf19e5e2054f5172c07a152f9e04eb3bae3d86dd (diff)
downloadlinux-60aa80460da115216070082b4ab686b9e37c86ef.tar.bz2
esp4: remove redundant initialization of pointer esph
Pointer esph is being assigned a value that is never read, esph is re-assigned and only read inside an if statement, hence the initialization is redundant and can be removed. Cleans up clang warning: net/ipv4/esp4.c:657:21: warning: Value stored to 'esph' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4/esp4.c')
-rw-r--r--net/ipv4/esp4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 296d0b956bfe..97689012b357 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -654,7 +654,7 @@ static void esp_input_restore_header(struct sk_buff *skb)
static void esp_input_set_header(struct sk_buff *skb, __be32 *seqhi)
{
struct xfrm_state *x = xfrm_input_state(skb);
- struct ip_esp_hdr *esph = (struct ip_esp_hdr *)skb->data;
+ struct ip_esp_hdr *esph;
/* For ESN we move the header forward by 4 bytes to
* accomodate the high bits. We will move it back after