net/tls: Remove redundant initialization of record
Subsystems (3)
PATCH 1/1 net/tls: Remove redundant initialization of record
record is being initialized to ctx->open_record but this is never read as record is overwritten later on. Remove the redundant initialization.
Cleans up the following clang-analyzer warning:
net/tls/tls_device.c:421:26: warning: Value stored to 'record' during its initialization is never read [clang-analyzer-deadcode.DeadStores].
--- net/tls/tls_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tls/tls_device.c +1 -1
@@ -418,7 +418,7 @@ static int tls_push_data(struct sock *sk,struct tls_context *tls_ctx =tls_get_ctx (sk);struct tls_prot_info *prot = &tls_ctx->prot_info;struct tls_offload_context_tx *ctx =tls_offload_ctx_tx (tls_ctx); -struct tls_record_info *record = ctx->open_record; +struct tls_record_info *record;int tls_push_record_flags;struct page_frag *pfrag;size_t orig_size = size;
Signature · 1 line
1.8.3.1
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 Tue, 27 Apr 2021 18:28:22 +0800 you wrote:
record is being initialized to
ctx->open_recordbut this is never read as record is overwritten later on. Remove the redundant initialization.Cleans up the following clang-analyzer warning:
net/tls/tls_device.c:421:26: warning: Value stored to 'record' during its initialization is never read [clang-analyzer-deadcode.DeadStores].[...]
Here is the summary with links:
- net/tls: Remove redundant initialization of record
https://git.kernel.org/netdev/net-next/c/3afef8c7aa2d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html