6lowpan: Remove unused pointer in lowpan_header_create()
Subsystems (3)
PATCH 1/1 6lowpan: Remove unused pointer in lowpan_header_create()
Commit 8df8c56a (6lowpan: Moving generic compression code into 6lowpan_iphc.c) left pointer 'hdr' unused - remove it.
Detected by Coverity: CID 1164868.
--- net/ieee802154/6lowpan.c | 3 --- 1 file changed, 3 deletions(-)
net/ieee802154/6lowpan.c +0 -3
@@ -106,7 +106,6 @@ static int lowpan_header_create(struct sk_buff *skb, unsigned short type, const void *_daddr, const void *_saddr, unsigned int len) { - struct ipv6hdr *hdr; const u8 *saddr = _saddr;const u8 *daddr = _daddr;struct ieee802154_addr sa, da;
@@ -117,8 +116,6 @@ static int lowpan_header_create(struct sk_buff *skb,if (type !=ETH_P_IPV6 )return 0 ; - hdr =ipv6_hdr (skb); -if (!saddr) saddr = dev->dev_addr;
Signature · 1 line
1.8.3.2
From: Christian Engelmayer <[email protected]>
Date: Fri, 7 Feb 2014 22:58:38 +0100
Quoted 6 lines
Commit
8df8c56a(6lowpan: Moving generic compression code into6lowpan_iphc.c) left pointer 'hdr' unused - remove it.Detected by Coverity: CID 1164868.
Signed-off-by Christian Engelmayer <[email protected]>
Applied, thanks.
Alexander Aring
maintainerHi,
I need the hdr pointer for my upcomming patches. Nevertheless it should be removed... it's not used anymore.
I am wondering why this patch was accepted, it's not a bug fix. Is net-next open again?
- Alex
David Miller
maintainerFrom: Alexander Aring <[email protected]>
Date: Mon, 10 Feb 2014 18:40:58 +0100
Quoted 5 lines
I need the hdr pointer for my upcomming patches. Nevertheless it should be removed... it's not used anymore.
I am wondering why this patch was accepted, it's not a bug fix. Is net-next open again?
Unused variables make code difficult to audit for bugs and similar.
Sometimes I apply patches like these for net, net-next is not open yet.