From: tb Date: Fri, 12 Jul 2024 09:35:54 +0000 (+0000) Subject: Simplify X509_EXTENSION_get_critical() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dfcfb53d7aa0715b997aecdc3d52fc2e9818e8c0;p=openbsd Simplify X509_EXTENSION_get_critical() This is a silly API, but there are worse. ok jsing --- diff --git a/lib/libcrypto/x509/x509_v3.c b/lib/libcrypto/x509/x509_v3.c index 5ae8fabf469..b5aee01d2df 100644 --- a/lib/libcrypto/x509/x509_v3.c +++ b/lib/libcrypto/x509/x509_v3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_v3.c,v 1.37 2024/07/12 09:33:05 tb Exp $ */ +/* $OpenBSD: x509_v3.c,v 1.38 2024/07/12 09:35:54 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -290,8 +290,7 @@ X509_EXTENSION_get_critical(const X509_EXTENSION *ext) { if (ext == NULL) return 0; - if (ext->critical > 0) - return 1; - return 0; + + return ext->critical > 0; } LCRYPTO_ALIAS(X509_EXTENSION_get_critical);