Skip to contentSkip to conversation

rxrpc: rxkad: Remove redundant variable offset

PATCH Applied Jiapeng Chong 2 participants 2 messages Apr 26, 2021 – Apr 27, 2021

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

PATCH 1/1 rxrpc: rxkad: Remove redundant variable offset

Variable offset 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/rxrpc/rxkad.c:579:2: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores].

net/rxrpc/rxkad.c:485:2: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores].

---
 net/rxrpc/rxkad.c | 2 --
 1 file changed, 2 deletions(-)
net/rxrpc/rxkad.c +0 -2
index e2e9e9b..08aab5c 100644
@@ -482,7 +482,6 @@ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *skb,
 					     RXKADDATALEN);
 		goto protocol_error;
 	}
-	offset += sizeof(sechdr);
 	len -= sizeof(sechdr);
 
 	buf = ntohl(sechdr.data_size);
@@ -576,7 +575,6 @@ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *skb,
 					     RXKADDATALEN);
 		goto protocol_error;
 	}
-	offset += sizeof(sechdr);
 	len -= sizeof(sechdr);
 
 	buf = ntohl(sechdr.data_size);
Signature · 1 line
1.8.3.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 10 lines · On Mon, 26 Apr 2021 18:13:03 +0800 you wrote:

Variable offset 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/rxrpc/rxkad.c:579:2: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores].

[...]

Here is the summary with links:
- rxrpc: rxkad: Remove redundant variable offset

    https://git.kernel.org/netdev/net-next/c/6c375d793be6

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html