Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: rlz/lib/rlz_lib.cc

Issue 11226060: RLZ: remove hard-coded Win || Mac conditions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « rlz/lib/rlz_lib.h ('k') | rlz/lib/rlz_value_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: rlz/lib/rlz_lib.cc
diff --git a/rlz/lib/rlz_lib.cc b/rlz/lib/rlz_lib.cc
index a613876fc686bf098464f5c7ee1686064978f7a6..8a1b729187e4f9ba9e764a1d5254c1113d96ef88 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)
« no previous file with comments | « rlz/lib/rlz_lib.h ('k') | rlz/lib/rlz_value_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698