Skip to content

Commit b1e78ef

Browse files
ColinIanKingtorvalds
authored andcommitted
lib: remove redundant assignment to variable ret
The variable ret is being assigned a value that is never read. If the for-loop is entered then ret is immediately re-assigned a new value. If the for-loop is not executed ret is never read. The assignment is redundant and can be removed. Link: https://lkml.kernel.org/r/20211230134557.83633-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 69d0db0 commit b1e78ef

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

lib/asn1_encoder.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ asn1_encode_oid(unsigned char *data, const unsigned char *end_data,
164164

165165
data_len -= 3;
166166

167-
ret = 0;
168-
169167
for (i = 2; i < oid_len; i++) {
170168
ret = asn1_encode_oid_digit(&d, &data_len, oid[i]);
171169
if (ret < 0)

0 commit comments

Comments
 (0)