In addition to a couple of minor clean-up items, this fixes an issue that can
rarely cause incorrect parsing of attribute flag values, when there is a '|'
character in the few bytes past the end of the attribute value being parsed.
Change-Id: I6050b1c2db60720c7c0ab7df9eba8cfc629b320e
const char16_t* end = name + nameLen;
const char16_t* pos = name;
- bool failed = false;
- while (pos < end && !failed) {
+ while (pos < end) {
const char16_t* start = pos;
- end++;
while (pos < end && *pos != '|') {
pos++;
}
// Didn't find this flag identifier.
return false;
}
- if (pos < end) {
- pos++;
- }
+ pos++;
}
return true;