From 93a1096fe48e12095544924adb267e3b8a16b221 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 16 Jun 2022 11:42:09 +0100 Subject: 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. --- src/evalwindow.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/evalwindow.c') diff --git a/src/evalwindow.c b/src/evalwindow.c index 20ac66f533..00d63cd365 100644 --- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -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) -- cgit v1.2.3