summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2021-12-30 16:45:57 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2022-01-09 01:18:54 +0300
commitd99a8af48a3de727173415ccb17f6b6ba60d5573 (patch)
tree354f67337af19f230f66c2526ff957e2d449efc6
parent84cc69589700b90a4c8d27b481a51fce8cca6051 (diff)
downloadlinux-d99a8af48a3de727173415ccb17f6b6ba60d5573.tar.xz
lib: remove redundant assignment to variable ret
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. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
-rw-r--r--lib/asn1_encoder.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/asn1_encoder.c b/lib/asn1_encoder.c
index 27bbe891714f..0fd3c454a468 100644
--- a/lib/asn1_encoder.c
+++ b/lib/asn1_encoder.c
@@ -164,8 +164,6 @@ asn1_encode_oid(unsigned char *data, const unsigned char *end_data,
data_len -= 3;
- ret = 0;
-
for (i = 2; i < oid_len; i++) {
ret = asn1_encode_oid_digit(&d, &data_len, oid[i]);
if (ret < 0)