diff options
Diffstat (limited to 'rlz/lib')
-rw-r--r-- | rlz/lib/rlz_lib.cc | 6 | ||||
-rw-r--r-- | rlz/lib/rlz_lib.h | 8 | ||||
-rw-r--r-- | rlz/lib/rlz_value_store.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/rlz/lib/rlz_lib.cc b/rlz/lib/rlz_lib.cc index a613876..8a1b729 100644 --- a/rlz/lib/rlz_lib.cc +++ b/rlz/lib/rlz_lib.cc @@ -84,7 +84,7 @@ bool IsGoodRlzChar(const char ch) { // reasonable size. It also assumes that normalized_rlz is at least // kMaxRlzLength+1 long. void NormalizeRlz(const char* raw_rlz, char* normalized_rlz) { - int index = 0; + size_t index = 0; for (; raw_rlz[index] != 0 && index < rlz_lib::kMaxRlzLength; ++index) { char current = raw_rlz[index]; if (IsGoodRlzChar(current)) { @@ -551,8 +551,8 @@ bool ParsePingResponse(Product product, const char* response) { std::string rlz_value(response_line.substr(separator_index + 2)); TrimWhitespaceASCII(rlz_value, TRIM_LEADING, &rlz_value); - int rlz_length = rlz_value.find_first_of("\r\n "); - if (rlz_length < 0) + size_t rlz_length = rlz_value.find_first_of("\r\n "); + if (rlz_length == std::string::npos) rlz_length = rlz_value.size(); if (rlz_length > kMaxRlzLength) diff --git a/rlz/lib/rlz_lib.h b/rlz/lib/rlz_lib.h index 9d4cf3b..1f8be5c 100644 --- a/rlz/lib/rlz_lib.h +++ b/rlz/lib/rlz_lib.h @@ -55,14 +55,14 @@ namespace rlz_lib { class ScopedRlzValueStoreLock; // The maximum length of an access points RLZ in bytes. -const int kMaxRlzLength = 64; +const size_t kMaxRlzLength = 64; // The maximum length of an access points RLZ in bytes. -const int kMaxDccLength = 128; +const size_t kMaxDccLength = 128; // The maximum length of a CGI string in bytes. -const int kMaxCgiLength = 2048; +const size_t kMaxCgiLength = 2048; // The maximum length of a ping response we will parse in bytes. If the response // is bigger, please break it up into separate calls. -const int kMaxPingResponseLength = 0x4000; // 16K +const size_t kMaxPingResponseLength = 0x4000; // 16K #if defined(RLZ_NETWORK_IMPLEMENTATION_CHROME_NET) // Set the URLRequestContextGetter used by SendFinancialPing(). The IO message diff --git a/rlz/lib/rlz_value_store.h b/rlz/lib/rlz_value_store.h index f45ac25..ab7279a 100644 --- a/rlz/lib/rlz_value_store.h +++ b/rlz/lib/rlz_value_store.h @@ -98,7 +98,7 @@ class ScopedRlzValueStoreLock { scoped_ptr<RlzValueStore> store_; #if defined(OS_WIN) LibMutex lock_; -#else +#elif defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool autorelease_pool_; #endif }; |