From 1c8235c9b3e328d4c8637fd51b1f45adfa6ee446 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 19 Oct 2016 11:35:55 +0100 Subject: [PATCH] Fix a code inconsistency Move from two ifs to a single one with an && Reviewed-by: Richard Levitte --- test/ossl_shim/ossl_shim.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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())) { -- 2.25.1