diff options
author | Dundar Göc <gocdundar@gmail.com> | 2021-07-30 14:28:42 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-07-30 14:29:54 +0200 |
commit | 518f0d3d4711a3d8ac5da4701c8972ea26403b93 (patch) | |
tree | b71c897e01f3e03792c9329a0f7e71da7e0fb30f /src | |
parent | d628e4250fc5f7dfc3fe1bd537ce38b6171c138c (diff) | |
download | rneovim-518f0d3d4711a3d8ac5da4701c8972ea26403b93.tar.gz rneovim-518f0d3d4711a3d8ac5da4701c8972ea26403b93.tar.bz2 rneovim-518f0d3d4711a3d8ac5da4701c8972ea26403b93.zip |
refactor: PVS/V501: removed duplicate sub-expression 'chunk.size > 2'
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/private/helpers.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 5a8c5de35c..3ec6151090 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -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; |