Mercurial > vim
changeset 31610:8707b2b5c45e v9.0.1137
patch 9.0.1137: some conditions are always false
Commit: https://github.com/vim/vim/commit/ea720aea851e645f4c8ec3b20afb27c7ca38184c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Jan 3 10:54:09 2023 +0000
patch 9.0.1137: some conditions are always false
Problem: Some conditions are always false.
Solution: Remove the useless conditions. (closes https://github.com/vim/vim/issues/11776)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Jan 2023 12:00:04 +0100 |
parents | 8642b33aab9f |
children | 193bddb8283e |
files | src/evalvars.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -4318,7 +4318,7 @@ setwinvar(typval_T *argvars, int off) varname = tv_get_string_chk(&argvars[off + 1]); varp = &argvars[off + 2]; - if (win == NULL || varname == NULL || varp == NULL) + if (win == NULL || varname == NULL) return; need_switch_win = !(tp == curtab && win == curwin); @@ -4687,7 +4687,7 @@ f_settabvar(typval_T *argvars, typval_T varname = tv_get_string_chk(&argvars[1]); varp = &argvars[2]; - if (varname == NULL || varp == NULL || tp == NULL) + if (varname == NULL || tp == NULL) return; save_curtab = curtab; @@ -4758,7 +4758,7 @@ f_setbufvar(typval_T *argvars, typval_T buf = tv_get_buf_from_arg(&argvars[0]); varp = &argvars[2]; - if (buf == NULL || varname == NULL || varp == NULL) + if (buf == NULL || varname == NULL) return; if (*varname == '&')