Mercurial > vim
comparison src/textprop.c @ 29175:755ab148288b v8.2.5107
patch 8.2.5107: some callers of rettv_list_alloc() check for not OK
Commit: https://github.com/vim/vim/commit/93a1096fe48e12095544924adb267e3b8a16b221
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 16 11:42:09 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 Jun 2022 12:45:03 +0200 |
parents | b3828315a0d9 |
children | fba9e366ced4 |
comparison
equal
deleted
inserted
replaced
29174:a13f0046b5ef | 29175:755ab148288b |
---|---|
1074 if (in_vim9script() | 1074 if (in_vim9script() |
1075 && (check_for_number_arg(argvars, 0) == FAIL | 1075 && (check_for_number_arg(argvars, 0) == FAIL |
1076 || check_for_opt_dict_arg(argvars, 1) == FAIL)) | 1076 || check_for_opt_dict_arg(argvars, 1) == FAIL)) |
1077 return; | 1077 return; |
1078 | 1078 |
1079 if (rettv_list_alloc(rettv) != OK) | 1079 if (rettv_list_alloc(rettv) == FAIL) |
1080 return; | 1080 return; |
1081 | 1081 |
1082 // default: get text properties on current line | 1082 // default: get text properties on current line |
1083 start_lnum = tv_get_number(&argvars[0]); | 1083 start_lnum = tv_get_number(&argvars[0]); |
1084 end_lnum = start_lnum; | 1084 end_lnum = start_lnum; |