summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_lu.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c
index a99c4283b1..b968a13d6f 100644
--- a/src/lib/libcrypto/x509/x509_lu.c
+++ b/src/lib/libcrypto/x509/x509_lu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_lu.c,v 1.40 2021/11/05 17:05:52 tb Exp $ */ 1/* $OpenBSD: x509_lu.c,v 1.41 2021/11/05 17:06:42 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -171,21 +171,16 @@ x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b)
171{ 171{
172 int ret; 172 int ret;
173 173
174 ret = ((*a)->type - (*b)->type); 174 if ((ret = (*a)->type - (*b)->type) != 0)
175 if (ret)
176 return ret; 175 return ret;
176
177 switch ((*a)->type) { 177 switch ((*a)->type) {
178 case X509_LU_X509: 178 case X509_LU_X509:
179 ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509); 179 return X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509);
180 break;
181 case X509_LU_CRL: 180 case X509_LU_CRL:
182 ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl); 181 return X509_CRL_cmp((*a)->data.crl, (*b)->data.crl);
183 break;
184 default:
185 /* abort(); */
186 return 0;
187 } 182 }
188 return ret; 183 return 0;
189} 184}
190 185
191X509_STORE * 186X509_STORE *