Merge "Fix sanitizer errors in bootstat.cpp."

am: 9ddf491492

Change-Id: Ib417abbcf4ce2b18f508af9e0ef95e4cca789c02
This commit is contained in:
Ivan Lozano 2017-12-21 17:52:41 +00:00 committed by android-build-merger
commit 2fbf6f1083

View file

@ -429,9 +429,11 @@ class pstoreConsole {
if (needle.length() > pos) return std::string::npos;
pos -= needle.length();
// fuzzy match to maximum kBitErrorRate
do {
for (;;) {
if (numError(pos, needle) != std::string::npos) return pos;
} while (pos-- != 0);
if (pos == 0) break;
--pos;
}
return std::string::npos;
}