1
0
forked from aniani/vim

patch 8.2.5107: some callers of rettv_list_alloc() check for not OK

Problem:    Some callers of rettv_list_alloc() check for not OK. (Christ van
            Willegen)
Solution:   Use "==" instead of "!=" when checking the return value.
This commit is contained in:
Bram Moolenaar
2022-06-16 11:42:09 +01:00
parent 44068e97db
commit 93a1096fe4
17 changed files with 40 additions and 38 deletions

View File

@@ -471,7 +471,7 @@ f_gettabinfo(typval_T *argvars, typval_T *rettv)
dict_T *d;
int tpnr = 0;
if (rettv_list_alloc(rettv) != OK)
if (rettv_list_alloc(rettv) == FAIL)
return;
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
@@ -510,7 +510,7 @@ f_getwininfo(typval_T *argvars, typval_T *rettv)
dict_T *d;
short tabnr = 0, winnr;
if (rettv_list_alloc(rettv) != OK)
if (rettv_list_alloc(rettv) == FAIL)
return;
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
@@ -779,7 +779,7 @@ f_win_findbuf(typval_T *argvars, typval_T *rettv)
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
return;
if (rettv_list_alloc(rettv) != FAIL)
if (rettv_list_alloc(rettv) == OK)
win_findbuf(argvars, rettv->vval.v_list);
}
@@ -847,7 +847,7 @@ f_win_id2tabwin(typval_T *argvars, typval_T *rettv)
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
return;
if (rettv_list_alloc(rettv) != FAIL)
if (rettv_list_alloc(rettv) == OK)
win_id2tabwin(argvars, rettv->vval.v_list);
}
@@ -1143,7 +1143,7 @@ f_winlayout(typval_T *argvars, typval_T *rettv)
{
tabpage_T *tp;
if (rettv_list_alloc(rettv) != OK)
if (rettv_list_alloc(rettv) == FAIL)
return;
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)