diff src/filepath.c @ 29239:da56650de132 v8.2.5138

patch 8.2.5138: various small issues Commit: https://github.com/vim/vim/commit/8088ae95bbed2085c5fb196850c4e4b8df55c989 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 20 11:38:17 2022 +0100 patch 8.2.5138: various small issues Problem: Various small issues. Solution: Various small improvments.
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Jun 2022 12:45:03 +0200
parents 495d55210aac
children f8b07c537036
line wrap: on
line diff
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -1314,7 +1314,7 @@ f_glob(typval_T *argvars, typval_T *rett
 	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 *
 	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);