diff options
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/cookie_monster.cc | 2 | ||||
-rw-r--r-- | net/base/dnssec_chain_verifier.cc | 7 | ||||
-rw-r--r-- | net/base/x509_cert_types_mac.cc | 2 | ||||
-rw-r--r-- | net/base/x509_certificate_mac.cc | 2 | ||||
-rw-r--r-- | net/base/x509_certificate_win.cc | 2 |
5 files changed, 6 insertions, 9 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc index 05e7355..b856f8a 100644 --- a/net/base/cookie_monster.cc +++ b/net/base/cookie_monster.cc @@ -1579,7 +1579,7 @@ CookieMonster::ParsedCookie::ParsedCookie(const std::string& cookie_line) } ParseTokenValuePairs(cookie_line); - if (pairs_.size() > 0) { + if (!pairs_.empty()) { is_valid_ = true; SetupAttributes(); } diff --git a/net/base/dnssec_chain_verifier.cc b/net/base/dnssec_chain_verifier.cc index 6e68365..c79efa8 100644 --- a/net/base/dnssec_chain_verifier.cc +++ b/net/base/dnssec_chain_verifier.cc @@ -732,12 +732,9 @@ DNSSECChainVerifier::Error DNSSECChainVerifier::ReadDSSet( } digest_types[i] = digest_type; - if (digest.size() > 0) { + lookahead[i] = digest.empty(); + if (!digest.empty()) (*rrdatas)[i] = digest; - lookahead[i] = false; - } else { - lookahead[i] = true; - } } base::StringPiece next_entry_key; diff --git a/net/base/x509_cert_types_mac.cc b/net/base/x509_cert_types_mac.cc index c672863..a45dc71 100644 --- a/net/base/x509_cert_types_mac.cc +++ b/net/base/x509_cert_types_mac.cc @@ -150,7 +150,7 @@ void SetSingle(const std::vector<std::string>& values, std::string* single_value) { // We don't expect to have more than one CN, L, S, and C. LOG_IF(WARNING, values.size() > 1) << "Didn't expect multiple values"; - if (values.size() > 0) + if (!values.empty()) *single_value = values[0]; } diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc index f9023fd..839e91e 100644 --- a/net/base/x509_certificate_mac.cc +++ b/net/base/x509_certificate_mac.cc @@ -1128,7 +1128,7 @@ bool X509Certificate::GetSSLClientCertificates( // Make sure the issuer matches valid_issuers, if given. // But an explicit cert preference overrides this. if (!is_preferred && - valid_issuers.size() > 0 && + !valid_issuers.empty() && !cert->IsIssuedBy(valid_issuers)) continue; diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc index fed56e3..98e3367 100644 --- a/net/base/x509_certificate_win.cc +++ b/net/base/x509_certificate_win.cc @@ -405,7 +405,7 @@ void ParsePrincipal(const std::string& description, for (int i = 0; i < arraysize(single_value_lists); ++i) { int length = static_cast<int>(single_value_lists[i]->size()); DCHECK(single_value_lists[i]->size() <= 1); - if (single_value_lists[i]->size() > 0) + if (!single_value_lists[i]->empty()) *(single_values[i]) = (*(single_value_lists[i]))[0]; } } |