From e0c192f54534421e4e0ccd9d9c689634976f73e4 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 23 May 2024 01:42:23 +0000 Subject: [PATCH] x509_v3.c: remove a pointless local variable --- lib/libcrypto/x509/x509_v3.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/x509/x509_v3.c b/lib/libcrypto/x509/x509_v3.c index 4321c09c19f..3666d24c073 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.23 2024/05/23 01:40:23 tb Exp $ */ +/* $OpenBSD: x509_v3.c,v 1.24 2024/05/23 01:42:23 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -147,12 +147,10 @@ LCRYPTO_ALIAS(X509v3_get_ext); X509_EXTENSION * X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc) { - X509_EXTENSION *ret; - if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0) return NULL; - ret = sk_X509_EXTENSION_delete(x, loc); - return ret; + + return sk_X509_EXTENSION_delete(x, loc); } LCRYPTO_ALIAS(X509v3_delete_ext); -- 2.20.1