diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 10:01:49 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 10:01:49 +0200 |
commit | c08ca2964955290e1b69f3f8177517074c99a61e (patch) | |
tree | d90fe16709169a39ee5aaa2a472d1fc9df207972 | |
parent | 5faed57ac70ef637a2bce25e03458e976f8c8969 (diff) | |
download | rneovim-c08ca2964955290e1b69f3f8177517074c99a61e.tar.gz rneovim-c08ca2964955290e1b69f3f8177517074c99a61e.tar.bz2 rneovim-c08ca2964955290e1b69f3f8177517074c99a61e.zip |
PVS/V547: Expression is always false
-rw-r--r-- | src/nvim/quickfix.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 269c4d43ca..be643a6062 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1442,15 +1442,13 @@ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, } if (module == NULL || *module == NUL) { qfp->qf_module = NULL; - } else if ((qfp->qf_module = vim_strsave(module)) == NULL) { - xfree(qfp->qf_text); - xfree(qfp->qf_pattern); - xfree(qfp); - return QF_FAIL; + } else { + qfp->qf_module = vim_strsave(module); } qfp->qf_nr = nr; - if (type != 1 && !vim_isprintc(type)) /* only printable chars allowed */ + if (type != 1 && !vim_isprintc(type)) { // only printable chars allowed type = 0; + } qfp->qf_type = (char_u)type; qfp->qf_valid = valid; |