diff options
author | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 18:17:22 +0000 |
---|---|---|
committer | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 18:17:22 +0000 |
commit | b6a5ac9388e7102acfba1fb59cf4b71da5142ea3 (patch) | |
tree | 7efb9776132a59f32e1ac58c93f5cd23da1852ef /rlz/lib/rlz_lib.cc | |
parent | 25a4f08e8800de1cc628320b23e76a2db00d43e6 (diff) | |
download | chromium_src-b6a5ac9388e7102acfba1fb59cf4b71da5142ea3.zip chromium_src-b6a5ac9388e7102acfba1fb59cf4b71da5142ea3.tar.gz chromium_src-b6a5ac9388e7102acfba1fb59cf4b71da5142ea3.tar.bz2 |
RLZ: remove hard-coded Win || Mac conditions.
Add enable_rlz GYP variable and rely on ENABLE_RLZ macro instead of hard-coded Win || Mac checks.
Also, clean compile by gcc (signed/unsigned mismatch, etc).
BUG=157348
Review URL: https://chromiumcodereview.appspot.com/11226060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz/lib/rlz_lib.cc')
-rw-r--r-- | rlz/lib/rlz_lib.cc | 6 |
1 files changed, 3 insertions, 3 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) |