diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 10:33:18 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 10:33:18 +0000 |
commit | 6d0a39dee3f0343b3a4144006b0f0c05fd620321 (patch) | |
tree | 4ee4e723d955998a27843cba6018c3b8ae8cdf97 /net/base | |
parent | c2ce4631fbdfb60a9d8ea369a265ef7c1a3736a7 (diff) | |
download | chromium_src-6d0a39dee3f0343b3a4144006b0f0c05fd620321.zip chromium_src-6d0a39dee3f0343b3a4144006b0f0c05fd620321.tar.gz chromium_src-6d0a39dee3f0343b3a4144006b0f0c05fd620321.tar.bz2 |
A quick fix for Mac GCC.
This change just uses bit testing so Mac GCC does not complain "comparison is always false due to limited range of data type".
BUG=none
TEST=fix build on the "Webkit Mac (valgrind)" bot
Review URL: http://codereview.chromium.org/8427024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/crl_set.cc | 2 | ||||
-rw-r--r-- | net/base/x509_certificate.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/base/crl_set.cc b/net/base/crl_set.cc index 5c5a376..dff962b 100644 --- a/net/base/crl_set.cc +++ b/net/base/crl_set.cc @@ -410,7 +410,7 @@ CRLSet::Result CRLSet::CheckCertificate( const base::StringPiece& parent_spki) const { base::StringPiece serial(serial_number); - if (!serial.empty() && serial[0] >= 0x80) { + if (!serial.empty() && (serial[0] & 0x80) != 0) { // This serial number is negative but the process which generates CRL sets // will reject any certificates with negative serial numbers as invalid. return UNKNOWN; diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc index 2762154..9db4ff0 100644 --- a/net/base/x509_certificate.cc +++ b/net/base/x509_certificate.cc @@ -710,7 +710,7 @@ bool X509Certificate::IsBlacklisted() const { {0x3e,0x75,0xce,0xd4,0x6b,0x69,0x30,0x21,0x21,0x88,0x30,0xae,0x86,0xa8,0x2a,0x71}, }; - if (!serial_number_.empty() && serial_number_[0] >= 0x80) { + if (!serial_number_.empty() && (serial_number_[0] & 0x80) != 0) { // This is a negative serial number, which isn't technically allowed but // which probably happens. In order to avoid confusing a negative serial // number with a positive one once the leading zeros have been removed, we |