From: Matt Caswell Date: Wed, 19 Oct 2016 10:35:55 +0000 (+0100) Subject: Fix a code inconsistency X-Git-Tag: OpenSSL_1_1_1-pre1~3233 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c8235c9b3e328d4c8637fd51b1f45adfa6ee446;p=oweals%2Fopenssl.git Fix a code inconsistency Move from two ifs to a single one with an && Reviewed-by: Richard Levitte --- diff --git a/test/ossl_shim/ossl_shim.cc b/test/ossl_shim/ossl_shim.cc index fc2180ef5e..02917c970f 100644 --- a/test/ossl_shim/ossl_shim.cc +++ b/test/ossl_shim/ossl_shim.cc @@ -176,10 +176,8 @@ static bool InstallCertificate(SSL *ssl) { return false; } - if (pkey) { - if (!SSL_use_PrivateKey(ssl, pkey.get())) { - return false; - } + if (pkey && !SSL_use_PrivateKey(ssl, pkey.get())) { + return false; } if (x509 && !SSL_use_certificate(ssl, x509.get())) {