diff mbox series

[1/5] cert: remove usused elem_data variable

Message ID 20240305132807.85724-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/5] cert: remove usused elem_data variable | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood March 5, 2024, 1:28 p.m. UTC
This was being set in the if block, but never used after that.
Instead just check the return value directly.
---
 ell/cert.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Denis Kenzior March 12, 2024, 3:12 a.m. UTC | #1
Hi James,

On 3/5/24 07:28, James Prestwood wrote:
> This was being set in the if block, but never used after that.
> Instead just check the return value directly.
> ---
>   ell/cert.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 

All applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/ell/cert.c b/ell/cert.c
index ead9cfd..38bb01a 100644
--- a/ell/cert.c
+++ b/ell/cert.c
@@ -1658,7 +1658,6 @@  static int cert_try_load_der_format(const uint8_t *content, size_t content_len,
 {
 	const uint8_t *seq;
 	size_t seq_len;
-	const uint8_t *elem_data;
 	size_t elem_len;
 	uint8_t tag;
 
@@ -1674,8 +1673,7 @@  static int cert_try_load_der_format(const uint8_t *content, size_t content_len,
 	 * to add any more formats we'll probably need to start guessing
 	 * from the filename suffix.
 	 */
-	if (!(elem_data = asn1_der_find_elem(seq, seq_len,
-						0, &tag, &elem_len)))
+	if (!asn1_der_find_elem(seq, seq_len,0, &tag, &elem_len))
 		return -ENOMSG;
 
 	if (tag == ASN1_ID_SEQUENCE) {