From 94ff2e0482fb8e9f39c5cd1da0b79ead60a25ee4 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 7 Jun 2025 09:28:00 +0000 Subject: Fix smatch warning in asn1_primitive_print() Remove unnecessary and inconsistent NULL check for 'it', which the only caller, asn1_item_print_ctx(), already dereferenced. found by jsg ok kenjiro --- src/lib/libcrypto/asn1/tasn_prn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c index 433d939f1f..4db6d61111 100644 --- a/src/lib/libcrypto/asn1/tasn_prn.c +++ b/src/lib/libcrypto/asn1/tasn_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_prn.c,v 1.28 2025/05/10 05:54:38 tb Exp $ */ +/* $OpenBSD: tasn_prn.c,v 1.29 2025/06/07 09:28:00 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -410,7 +410,7 @@ asn1_primitive_print(BIO *out, ASN1_VALUE **fld, const ASN1_ITEM *it, if (!asn1_print_fsname(out, indent, fname, sname, pctx)) return 0; - if (it != NULL && it->funcs != NULL) { + if (it->funcs != NULL) { const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; if (pf->prim_print == NULL) -- cgit v1.2.3-55-g6feb