Skip to contentSkip to conversation

caif: Remove redundant variable expectlen

PATCH New Jiapeng Chong 1 participant 1 message Apr 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 caif: Remove redundant variable expectlen

Variable expectlen is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed.

Cleans up the following clang-analyzer warning:

net/caif/cfserl.c:126:5: warning: Value stored to 'expectlen' is never read [clang-analyzer-deadcode.DeadStores].

---
 net/caif/cfserl.c | 1 -
 1 file changed, 1 deletion(-)
net/caif/cfserl.c +0 -1
index e11725a..fef72e6 100644
@@ -123,7 +123,6 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
 				if (pkt != NULL)
 					cfpkt_destroy(pkt);
 				layr->incomplete_frm = NULL;
-				expectlen = 0;
 				spin_unlock(&layr->sync);
 				return -EPROTO;
 			}
Signature · 1 line
1.8.3.1