diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 03:53:37 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 03:53:37 +0000 |
commit | 4f1e4c50e04231e1f8fe5f697b61e5e48d55a8c9 (patch) | |
tree | 7f0482c90be30ca91dfedd9a714f249438ffb0c4 /net/ocsp | |
parent | 35306f60755be6a153a49d9c1883c897df26f819 (diff) | |
download | chromium_src-4f1e4c50e04231e1f8fe5f697b61e5e48d55a8c9.zip chromium_src-4f1e4c50e04231e1f8fe5f697b61e5e48d55a8c9.tar.gz chromium_src-4f1e4c50e04231e1f8fe5f697b61e5e48d55a8c9.tar.bz2 |
[Coverity] Removed redundant condition
CID=105918
R=wtc@chromium.org
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11052005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ocsp')
-rw-r--r-- | net/ocsp/nss_ocsp.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc index a85a80d..b6e541a 100644 --- a/net/ocsp/nss_ocsp.cc +++ b/net/ocsp/nss_ocsp.cc @@ -764,20 +764,20 @@ SECStatus OCSPTrySendAndReceive(SEC_HTTP_REQUEST_SESSION request, bool is_crl = strcasecmp(mime_type, "application/x-pkcs7-crl") == 0 || strcasecmp(mime_type, "application/x-x509-crl") == 0 || strcasecmp(mime_type, "application/pkix-crl") == 0; - bool is_crt = + bool is_cert = strcasecmp(mime_type, "application/x-x509-ca-cert") == 0 || strcasecmp(mime_type, "application/x-x509-server-cert") == 0 || strcasecmp(mime_type, "application/pkix-cert") == 0 || strcasecmp(mime_type, "application/pkcs7-mime") == 0; - if (!is_crt && !is_crt && !is_ocsp) { + if (!is_cert && !is_crl && !is_ocsp) { // We didn't get a hint from the MIME type, so do the best that we can. const std::string path = req->url().path(); const std::string host = req->url().host(); is_crl = strcasestr(path.c_str(), ".crl") != NULL; - is_crt = strcasestr(path.c_str(), ".crt") != NULL || - strcasestr(path.c_str(), ".p7c") != NULL || - strcasestr(path.c_str(), ".cer") != NULL; + is_cert = strcasestr(path.c_str(), ".crt") != NULL || + strcasestr(path.c_str(), ".p7c") != NULL || + strcasestr(path.c_str(), ".cer") != NULL; is_ocsp = strcasestr(host.c_str(), "ocsp") != NULL || req->http_request_method() == "POST"; } @@ -798,7 +798,7 @@ SECStatus OCSPTrySendAndReceive(SEC_HTTP_REQUEST_SESSION request, UMA_HISTOGRAM_TIMES("Net.CRLRequestFailedTimeMs", duration); UMA_HISTOGRAM_BOOLEAN("Net.CRLRequestSuccess", false); } - } else if (is_crt) { + } else if (is_cert) { if (ok) UMA_HISTOGRAM_TIMES("Net.CRTRequestTimeMs", duration); } else { |