diff options
author | tb <> | 2025-06-07 09:28:00 +0000 |
---|---|---|
committer | tb <> | 2025-06-07 09:28:00 +0000 |
commit | c7d111899342662acc283c79460c528fac240a59 (patch) | |
tree | 8d476a297f156285fe752e8b4896b6b86336cc3d /src | |
parent | adb6a70429b1c400ee9464123d7a5f10313c1b36 (diff) | |
download | openbsd-c7d111899342662acc283c79460c528fac240a59.tar.gz openbsd-c7d111899342662acc283c79460c528fac240a59.tar.bz2 openbsd-c7d111899342662acc283c79460c528fac240a59.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_prn.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: tasn_prn.c,v 1.28 2025/05/10 05:54:38 tb Exp $ */ | 1 | /* $OpenBSD: tasn_prn.c,v 1.29 2025/06/07 09:28:00 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -410,7 +410,7 @@ asn1_primitive_print(BIO *out, ASN1_VALUE **fld, const ASN1_ITEM *it, | |||
410 | if (!asn1_print_fsname(out, indent, fname, sname, pctx)) | 410 | if (!asn1_print_fsname(out, indent, fname, sname, pctx)) |
411 | return 0; | 411 | return 0; |
412 | 412 | ||
413 | if (it != NULL && it->funcs != NULL) { | 413 | if (it->funcs != NULL) { |
414 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; | 414 | const ASN1_PRIMITIVE_FUNCS *pf = it->funcs; |
415 | 415 | ||
416 | if (pf->prim_print == NULL) | 416 | if (pf->prim_print == NULL) |