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.
This commit is contained in:
ZyX
2018-04-15 20:36:21 +03:00
parent b8f69b6b9a
commit 24ee261317

View File

@@ -1001,8 +1001,8 @@ static int cs_find_common(char *opt, char *pat, int forceit, int verbose,
return FALSE; return FALSE;
} }
if (qfpos != NULL && *qfpos != '0' && totmatches > 0) { if (qfpos != NULL && *qfpos != '0') {
/* fill error list */ // Fill error list.
FILE *f; FILE *f;
char_u *tmp = vim_tempname(); char_u *tmp = vim_tempname();
qf_info_T *qi = NULL; qf_info_T *qi = NULL;