Skip to content

Commit

Permalink
net/tls: Remove redundant initialization of record
Browse files Browse the repository at this point in the history
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].

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jiapeng Chong authored and davem330 committed Apr 27, 2021
1 parent 4db6187 commit 3afef8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tls/tls_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3afef8c

Please sign in to comment.