0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.5138: various small issues

Problem:    Various small issues.
Solution:   Various small improvments.
This commit is contained in:
Bram Moolenaar
2022-06-20 11:38:17 +01:00
parent 509ce03831
commit 8088ae95bb
6 changed files with 11 additions and 8 deletions

View File

@@ -1314,7 +1314,7 @@ f_glob(typval_T *argvars, typval_T *rettv)
if (rettv->v_type == VAR_STRING)
rettv->vval.v_string = ExpandOne(&xpc, tv_get_string(&argvars[0]),
NULL, options, WILD_ALL);
else if (rettv_list_alloc(rettv) != FAIL)
else if (rettv_list_alloc(rettv) == OK)
{
int i;
@@ -1395,7 +1395,7 @@ f_globpath(typval_T *argvars, typval_T *rettv)
globpath(tv_get_string(&argvars[0]), file, &ga, flags);
if (rettv->v_type == VAR_STRING)
rettv->vval.v_string = ga_concat_strings(&ga, "\n");
else if (rettv_list_alloc(rettv) != FAIL)
else if (rettv_list_alloc(rettv) == OK)
for (i = 0; i < ga.ga_len; ++i)
list_append_string(rettv->vval.v_list,
((char_u **)(ga.ga_data))[i], -1);