Commit 953abb38 authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

skbuff: remove unused variable `doff'

There are two instances of an unused variable, `doff' added by
commit 6fa01ccd ("skbuff: Add pskb_extract() helper function")
in pskb_carve_inside_header() and pskb_carve_inside_nonlinear().
Remove these instances, they are not used.

Reported by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ddb6b71
...@@ -4634,7 +4634,6 @@ static int pskb_carve_inside_header(struct sk_buff *skb, const u32 off, ...@@ -4634,7 +4634,6 @@ static int pskb_carve_inside_header(struct sk_buff *skb, const u32 off,
int size = skb_end_offset(skb); int size = skb_end_offset(skb);
int new_hlen = headlen - off; int new_hlen = headlen - off;
u8 *data; u8 *data;
int doff = 0;
size = SKB_DATA_ALIGN(size); size = SKB_DATA_ALIGN(size);
...@@ -4674,13 +4673,11 @@ static int pskb_carve_inside_header(struct sk_buff *skb, const u32 off, ...@@ -4674,13 +4673,11 @@ static int pskb_carve_inside_header(struct sk_buff *skb, const u32 off,
skb_free_head(skb); skb_free_head(skb);
} }
doff = (data - skb->head);
skb->head = data; skb->head = data;
skb->data = data; skb->data = data;
skb->head_frag = 0; skb->head_frag = 0;
#ifdef NET_SKBUFF_DATA_USES_OFFSET #ifdef NET_SKBUFF_DATA_USES_OFFSET
skb->end = size; skb->end = size;
doff = 0;
#else #else
skb->end = skb->head + size; skb->end = skb->head + size;
#endif #endif
...@@ -4761,7 +4758,6 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off, ...@@ -4761,7 +4758,6 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off,
u8 *data; u8 *data;
const int nfrags = skb_shinfo(skb)->nr_frags; const int nfrags = skb_shinfo(skb)->nr_frags;
struct skb_shared_info *shinfo; struct skb_shared_info *shinfo;
int doff = 0;
size = SKB_DATA_ALIGN(size); size = SKB_DATA_ALIGN(size);
...@@ -4816,13 +4812,11 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off, ...@@ -4816,13 +4812,11 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off,
} }
skb_release_data(skb); skb_release_data(skb);
doff = (data - skb->head);
skb->head = data; skb->head = data;
skb->head_frag = 0; skb->head_frag = 0;
skb->data = data; skb->data = data;
#ifdef NET_SKBUFF_DATA_USES_OFFSET #ifdef NET_SKBUFF_DATA_USES_OFFSET
skb->end = size; skb->end = size;
doff = 0;
#else #else
skb->end = skb->head + size; skb->end = skb->head + size;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment