diff options
author | Daniel Neus <[email protected]> | 2016-01-04 21:35:24 +0100 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-01-04 21:35:24 +0100 |
commit | 443a5c25db02aa7ac505fdc3b0fa60c1d584a5f1 (patch) | |
tree | 6683223da4ea9917914c0eb9d7d1110cc86ac6f6 /src/lib/cert/x509/x509cert.cpp | |
parent | 9d3ad9a0f44a9321185ed9f221c828dac81b9f0c (diff) |
String comparision fixes
fix PVS-Studio perfomance warnings
Diffstat (limited to 'src/lib/cert/x509/x509cert.cpp')
-rw-r--r-- | src/lib/cert/x509/x509cert.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/cert/x509/x509cert.cpp b/src/lib/cert/x509/x509cert.cpp index 3d1ebbbad..7e5199c00 100644 --- a/src/lib/cert/x509/x509cert.cpp +++ b/src/lib/cert/x509/x509cert.cpp @@ -379,7 +379,7 @@ std::string X509_Certificate::fingerprint(const std::string& hash_name) const bool X509_Certificate::matches_dns_name(const std::string& name) const { - if(name == "") + if(name.empty()) return false; std::vector<std::string> issued_names = subject_info("DNS"); @@ -508,9 +508,9 @@ std::string X509_Certificate::to_string() const out << " " << ex_constraints[i] << "\n"; } - if(ocsp_responder() != "") + if(!ocsp_responder().empty()) out << "OCSP responder " << ocsp_responder() << "\n"; - if(crl_distribution_point() != "") + if(!crl_distribution_point().empty()) out << "CRL " << crl_distribution_point() << "\n"; out << "Signature algorithm: " << |