| 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)
|
|
|