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/[email protected] Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 69d0db0 commit b1e78ef

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

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)