summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_cert.c
diff options
context:
space:
mode:
authorKaoruToda <kunnpuu@gmail.com>2017-10-20 22:58:46 -0400
committerRich Salz <rsalz@openssl.org>2017-10-20 22:58:46 -0400
commitb2555168ecf6e88ad9aeb0ad4f7b7a714901d575 (patch)
treeb6fd7dd897650fd824bcbfaaac76825e867a9cc6 /ssl/ssl_cert.c
parent9b02dc97e4963969da69675a871dbe80e6d31cda (diff)
Various clean-ups
Add a check for NULL return in t1_lib.c. Since return type of ssl_cert_lookup_by_idx is pointer and unify coding style, I changed from zero to NULL in ssl_cert.c. Remove unnecessary space for ++. Fix incorrect condition Expression is always false because 'else if' condition matches previous condition. SInce the next line of 'else if' condition has substituted TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2, the 'else if' condition should compare with NID_X9_62_characteristic_two_field. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4562)
Diffstat (limited to 'ssl/ssl_cert.c')
-rw-r--r--ssl/ssl_cert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 3de3c2c7c5..43b084d607 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -1002,6 +1002,6 @@ const SSL_CERT_LOOKUP *ssl_cert_lookup_by_pkey(const EVP_PKEY *pk, size_t *pidx)
const SSL_CERT_LOOKUP *ssl_cert_lookup_by_idx(size_t idx)
{
if (idx >= OSSL_NELEM(ssl_cert_info))
- return 0;
+ return NULL;
return &ssl_cert_info[idx];
}