diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 10:01:57 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-05-06 10:01:57 +0200 |
commit | a52e93dfd84aac561ac05e74ce2193e6f396cc07 (patch) | |
tree | 58af580f35c9e25f4a3ff4861f14003908fa3c33 | |
parent | c08ca2964955290e1b69f3f8177517074c99a61e (diff) | |
download | rneovim-a52e93dfd84aac561ac05e74ce2193e6f396cc07.tar.gz rneovim-a52e93dfd84aac561ac05e74ce2193e6f396cc07.tar.bz2 rneovim-a52e93dfd84aac561ac05e74ce2193e6f396cc07.zip |
PVS/V547: Expression is always false
-rw-r--r-- | src/nvim/tag.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 67ac16ea0e..813933e155 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -2874,9 +2874,7 @@ static void get_tag_details(taggy_T *tag, dict_T *retdict) tv_dict_add_nr(retdict, S_LEN("matchnr"), tag->cur_match + 1); tv_dict_add_nr(retdict, S_LEN("bufnr"), tag->cur_fnum); - if ((pos = tv_list_alloc(4)) == NULL) { - return; - } + pos = tv_list_alloc(4); tv_dict_add_list(retdict, S_LEN("from"), pos); fmark = &tag->fmark; @@ -2899,17 +2897,11 @@ void get_tagstack(win_T *wp, dict_T *retdict) tv_dict_add_nr(retdict, S_LEN("length"), wp->w_tagstacklen); tv_dict_add_nr(retdict, S_LEN("curidx"), wp->w_tagstackidx + 1); l = tv_list_alloc(2); - if (l == NULL) { - return; - } tv_dict_add_list(retdict, S_LEN("items"), l); for (i = 0; i < wp->w_tagstacklen; i++) { - if ((d = tv_dict_alloc()) == NULL) { - return; - } + d = tv_dict_alloc(); tv_list_append_dict(l, d); - get_tag_details(&wp->w_tagstack[i], d); } } |