Merge pull request #15222 from dundargoc/PVS/V501

refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2'
This commit is contained in:
Björn Linse 2021-07-30 15:41:27 +02:00 committed by GitHub
commit 7b627ece8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1603,8 +1603,7 @@ VirtText parse_virt_text(Array chunks, Error *err, int *width)
}
Array chunk = chunks.items[i].data.array;
if (chunk.size == 0 || chunk.size > 2
|| chunk.items[0].type != kObjectTypeString
|| chunk.size > 2) {
|| chunk.items[0].type != kObjectTypeString) {
api_set_error(err, kErrorTypeValidation,
"Chunk is not an array with one or two strings");
goto free_exit;