mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2'
This commit is contained in:
@@ -1603,8 +1603,7 @@ VirtText parse_virt_text(Array chunks, Error *err, int *width)
|
|||||||
}
|
}
|
||||||
Array chunk = chunks.items[i].data.array;
|
Array chunk = chunks.items[i].data.array;
|
||||||
if (chunk.size == 0 || chunk.size > 2
|
if (chunk.size == 0 || chunk.size > 2
|
||||||
|| chunk.items[0].type != kObjectTypeString
|
|| chunk.items[0].type != kObjectTypeString) {
|
||||||
|| chunk.size > 2) {
|
|
||||||
api_set_error(err, kErrorTypeValidation,
|
api_set_error(err, kErrorTypeValidation,
|
||||||
"Chunk is not an array with one or two strings");
|
"Chunk is not an array with one or two strings");
|
||||||
goto free_exit;
|
goto free_exit;
|
||||||
|
Reference in New Issue
Block a user