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/tls/tls_handshake_state.cpp | |
parent | 9d3ad9a0f44a9321185ed9f221c828dac81b9f0c (diff) |
String comparision fixes
fix PVS-Studio perfomance warnings
Diffstat (limited to 'src/lib/tls/tls_handshake_state.cpp')
-rw-r--r-- | src/lib/tls/tls_handshake_state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/tls/tls_handshake_state.cpp b/src/lib/tls/tls_handshake_state.cpp index f885d3b08..b085e378a 100644 --- a/src/lib/tls/tls_handshake_state.cpp +++ b/src/lib/tls/tls_handshake_state.cpp @@ -462,7 +462,7 @@ Handshake_State::understand_sig_format(const Public_Key& key, if(this->version().supports_negotiable_signature_algorithms()) { - if(hash_algo == "") + if(hash_algo.empty()) throw Decoding_Error("Counterparty did not send hash/sig IDS"); if(sig_algo != algo_name) @@ -470,7 +470,7 @@ Handshake_State::understand_sig_format(const Public_Key& key, } else { - if(hash_algo != "" || sig_algo != "") + if(!hash_algo.empty() || !sig_algo.empty()) throw Decoding_Error("Counterparty sent hash/sig IDs with old version"); } |