From 0f30a4517cb2ece4a9a563e33c6c7c33f846f015 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 21 Apr 2023 20:30:53 +0000 Subject: cms_io: Remove a stupid else branch If you can initialize with functions, you can also initialize with constants... --- src/lib/libcrypto/cms/cms_io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/cms/cms_io.c') diff --git a/src/lib/libcrypto/cms/cms_io.c b/src/lib/libcrypto/cms/cms_io.c index c8c4791d28..c45e4a03dd 100644 --- a/src/lib/libcrypto/cms/cms_io.c +++ b/src/lib/libcrypto/cms/cms_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms_io.c,v 1.14 2023/04/21 20:08:23 tb Exp $ */ +/* $OpenBSD: cms_io.c,v 1.15 2023/04/21 20:30:53 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. @@ -144,14 +144,12 @@ PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags) int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) { - STACK_OF(X509_ALGOR) *mdalgs; + STACK_OF(X509_ALGOR) *mdalgs = NULL; int ctype_nid = OBJ_obj2nid(cms->contentType); int econt_nid = OBJ_obj2nid(CMS_get0_eContentType(cms)); if (ctype_nid == NID_pkcs7_signed) mdalgs = cms->d.signedData->digestAlgorithms; - else - mdalgs = NULL; return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, ctype_nid, econt_nid, mdalgs, &CMS_ContentInfo_it); -- cgit v1.2.3-55-g6feb