diff options
author | Matt Caswell <matt@openssl.org> | 2016-10-19 11:35:55 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-11-04 10:38:54 +0000 |
commit | 1c8235c9b3e328d4c8637fd51b1f45adfa6ee446 (patch) | |
tree | 563950f783d0d91f90926e24f446c7adc530f6d4 | |
parent | fc237de7ff4886c0d58300051ea4325e10b6943f (diff) | |
download | openssl-1c8235c9b3e328d4c8637fd51b1f45adfa6ee446.zip openssl-1c8235c9b3e328d4c8637fd51b1f45adfa6ee446.tar.gz openssl-1c8235c9b3e328d4c8637fd51b1f45adfa6ee446.tar.bz2 |
Fix a code inconsistency
Move from two ifs to a single one with an &&
Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r-- | test/ossl_shim/ossl_shim.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/ossl_shim/ossl_shim.cc b/test/ossl_shim/ossl_shim.cc index fc2180e..02917c9 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())) { |