aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/quickfix.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-14 12:41:25 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-03-14 13:09:57 +0800
commit61b48e91b941258e6945e3eafadc777dccef5b75 (patch)
tree132b06712a25cc34f93883a9ea63c26b4ce4bf45 /src/nvim/quickfix.c
parent090d1fd0b86897d2f5a80a600becf1525398ef30 (diff)
downloadrneovim-61b48e91b941258e6945e3eafadc777dccef5b75.tar.gz
rneovim-61b48e91b941258e6945e3eafadc777dccef5b75.tar.bz2
rneovim-61b48e91b941258e6945e3eafadc777dccef5b75.zip
vim-patch:9.1.0177: Coverity reports dead code
Problem: Coverity reports dead code. Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len() and update some comments (zeertzjq). closes: vim/vim#14189 https://github.com/vim/vim/commit/8c55d60658b7ee3458dca57fc5eec90ca9bb9bf3
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r--src/nvim/quickfix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index a2029a6ae5..0f639bf86a 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -5362,7 +5362,7 @@ static bool vgr_match_buflines(qf_list_T *qfl, char *fname, buf_T *buf, char *sp
}
} else {
char *const str = ml_get_buf(buf, lnum);
- const int line_len = ml_get_buf_len(buf, lnum);
+ const colnr_T linelen = ml_get_buf_len(buf, lnum);
int score;
uint32_t matches[MAX_FUZZY_MATCHES];
const size_t sz = sizeof(matches) / sizeof(matches[0]);
@@ -5401,7 +5401,7 @@ static bool vgr_match_buflines(qf_list_T *qfl, char *fname, buf_T *buf, char *sp
break;
}
col = (colnr_T)matches[pat_len - 1] + col + 1;
- if (col > line_len) {
+ if (col > linelen) {
break;
}
}