diff options
author | tb <> | 2025-06-07 09:28:00 +0000 |
---|---|---|
committer | tb <> | 2025-06-07 09:28:00 +0000 |
commit | 94ff2e0482fb8e9f39c5cd1da0b79ead60a25ee4 (patch) | |
tree | 8d476a297f156285fe752e8b4896b6b86336cc3d | |
parent | 9b01e9f65b0020e9e4a1d1ac90e01d0b89dfed07 (diff) | |
download | openbsd-94ff2e0482fb8e9f39c5cd1da0b79ead60a25ee4.tar.gz openbsd-94ff2e0482fb8e9f39c5cd1da0b79ead60a25ee4.tar.bz2 openbsd-94ff2e0482fb8e9f39c5cd1da0b79ead60a25ee4.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
-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) |