diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-15 20:36:21 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-15 20:36:21 +0300 |
commit | 24ee2613174250f9d32492c435c42daef3a44b21 (patch) | |
tree | 968082b05758bfbfebd4543326e00d88c077d905 | |
parent | b8f69b6b9a1b5339ba580e58725b8866339c1ad7 (diff) | |
download | rneovim-24ee2613174250f9d32492c435c42daef3a44b21.tar.gz rneovim-24ee2613174250f9d32492c435c42daef3a44b21.tar.bz2 rneovim-24ee2613174250f9d32492c435c42daef3a44b21.zip |
if_cscope: Fix PVS/V560: condition would result in earlier return
Previous block just checks for totmatches being zero and returns if it is. And
totmatches is unsigned, so `totmatches > 0` may never be true.
-rw-r--r-- | src/nvim/if_cscope.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c index b78b56562c..5d7bd26a2b 100644 --- a/src/nvim/if_cscope.c +++ b/src/nvim/if_cscope.c @@ -1001,8 +1001,8 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose, return FALSE; } - if (qfpos != NULL && *qfpos != '0' && totmatches > 0) { - /* fill error list */ + if (qfpos != NULL && *qfpos != '0') { + // Fill error list. FILE *f; char_u *tmp = vim_tempname(); qf_info_T *qi = NULL; |