summaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-04-28 17:58:05 +0800
committerJakub Kicinski <kuba@kernel.org>2021-04-28 13:59:08 -0700
commit15c0a64bfcbcc7a8dca805746f46ea6e746736ed (patch)
tree38e64e2831e7575d4a2686a5009d8c5625d2a425 /net/netrom
parent808337bec7366f948663952d8e739eb6c235a90f (diff)
downloadlinux-15c0a64bfcbcc7a8dca805746f46ea6e746736ed.tar.gz
linux-15c0a64bfcbcc7a8dca805746f46ea6e746736ed.tar.bz2
linux-15c0a64bfcbcc7a8dca805746f46ea6e746736ed.zip
net: netrom: nr_in: Remove redundant assignment to ns
Variable ns is set to 'skb->data[17]' but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/netrom/nr_in.c:156:2: warning: Value stored to 'ns' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1619603885-115604-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/nr_in.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 69e58906c32b..2f084b6f69d7 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -153,7 +153,6 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype
int queued = 0;
nr = skb->data[18];
- ns = skb->data[17];
switch (frametype) {
case NR_CONNREQ: