lkml.org 
[lkml]   [2021]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] ipv4: Remove useless assignments
Date
From: luo penghao <luo.penghao@zte.com.cn>

From: luo penghao <luo.penghao@zte.com.cn>

The assigned local variables will not be used next, so this statement
should be deleted.

The clang_analyzer complains as follows:

net/ipv4/ipconfig.c:1037:2 warning:

Value stored to 'h' is never read

Changes in v2:

Repair sending email box

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
net/ipv4/ipconfig.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 816d8aa..fe2c8e9 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1034,7 +1034,6 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
goto drop;

b = (struct bootp_pkt *)skb_network_header(skb);
- h = &b->iph;

/* One reply at a time, please. */
spin_lock(&ic_recv_lock);
--
2.15.2

\
 
 \ /
  Last update: 2021-11-04 04:03    [W:0.047 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site