Skip to content

Commit 2d5ddd1

Browse files
JesusFrekeAndroid (Google) Code Review
authored andcommitted
Merge "Fix up getAttributeFlags() function"
2 parents 78c914f + 59eb5fd commit 2d5ddd1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tools/aapt/ResourceTable.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,10 +2304,8 @@ bool ResourceTable::getAttributeFlags(
23042304

23052305
const char16_t* end = name + nameLen;
23062306
const char16_t* pos = name;
2307-
bool failed = false;
2308-
while (pos < end && !failed) {
2307+
while (pos < end) {
23092308
const char16_t* start = pos;
2310-
end++;
23112309
while (pos < end && *pos != '|') {
23122310
pos++;
23132311
}
@@ -2333,9 +2331,7 @@ bool ResourceTable::getAttributeFlags(
23332331
// Didn't find this flag identifier.
23342332
return false;
23352333
}
2336-
if (pos < end) {
2337-
pos++;
2338-
}
2334+
pos++;
23392335
}
23402336

23412337
return true;

0 commit comments

Comments
 (0)