From 24ee2613174250f9d32492c435c42daef3a44b21 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 15 Apr 2018 20:36:21 +0300 Subject: 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. --- src/nvim/if_cscope.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit