diff options
author | Ed Tanous <ed@tanous.net> | 2020-10-07 21:41:22 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2020-10-09 20:22:02 +0300 |
commit | 3174e4dfd3185c131a07371b4b5a5b40cf0e0bdb (patch) | |
tree | 10d3d0cf46070704c775cb2bd2f190575aedd49e /include/ssl_key_handler.hpp | |
parent | fc76b8ac6c2d9907ffd4618d22753db95c40953d (diff) | |
download | bmcweb-3174e4dfd3185c131a07371b4b5a5b40cf0e0bdb.tar.xz |
Write the clang-tidy file OpenBMC needs
Now that CI can handle clang-tidy, and a lot of the individual fixes
have landed for the various static analysis checks, lets see how close
we are.
This includes bringing a bunch of the code up to par with the checks
that require. Most of them fall into the category of extraneous else
statements, const correctness problems, or extra copies.
Tested:
CI only. Unit tests pass.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9fbd346560a75fdd3901fa40c57932486275e912
Diffstat (limited to 'include/ssl_key_handler.hpp')
-rw-r--r-- | include/ssl_key_handler.hpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp index deb3a76e9a..19d3ec7f60 100644 --- a/include/ssl_key_handler.hpp +++ b/include/ssl_key_handler.hpp @@ -32,10 +32,7 @@ inline bool isTrustChainError(int errnum) { return true; } - else - { - return false; - } + return false; } inline bool validateCertificate(X509* const cert) @@ -85,12 +82,9 @@ inline bool validateCertificate(X509* const cert) << X509_verify_cert_error_string(errCode); return true; } - else - { - BMCWEB_LOG_ERROR << "Certificate verification failed. Reason: " - << X509_verify_cert_error_string(errCode); - return false; - } + BMCWEB_LOG_ERROR << "Certificate verification failed. Reason: " + << X509_verify_cert_error_string(errCode); + return false; } BMCWEB_LOG_ERROR |