From: tb Date: Wed, 1 Nov 2023 20:22:24 +0000 (+0000) Subject: Unindent X509_ALGOR_set0_parameter() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=df22244631d8f73dad924a0b74717dcffab4c598;p=openbsd Unindent X509_ALGOR_set0_parameter() ok jsing --- diff --git a/lib/libcrypto/asn1/x_algor.c b/lib/libcrypto/asn1/x_algor.c index 869625036af..c0bc41dd344 100644 --- a/lib/libcrypto/asn1/x_algor.c +++ b/lib/libcrypto/asn1/x_algor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_algor.c,v 1.33 2023/11/01 20:19:16 tb Exp $ */ +/* $OpenBSD: x_algor.c,v 1.34 2023/11/01 20:22:24 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -164,15 +164,18 @@ X509_ALGOR_set0_parameter(X509_ALGOR *alg, int ptype, void *pval) if (ptype == V_ASN1_UNDEF) { ASN1_TYPE_free(alg->parameter); alg->parameter = NULL; - } else { - if (alg->parameter == NULL) - alg->parameter = ASN1_TYPE_new(); - if (alg->parameter == NULL) - return 0; - if (ptype != 0) - ASN1_TYPE_set(alg->parameter, ptype, pval); + + return 1; } + if (alg->parameter == NULL) + alg->parameter = ASN1_TYPE_new(); + if (alg->parameter == NULL) + return 0; + + if (ptype != 0) + ASN1_TYPE_set(alg->parameter, ptype, pval); + return 1; }