aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index f27e73a7a2..1bddafbee3 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -8466,9 +8466,9 @@ static void f_executable(typval_T *argvars, typval_T *rettv, FunPtr fptr)
// Check in $PATH and also check directly if there is a directory name
rettv->vval.v_number = (
- os_can_exe((const char_u *)name, NULL, true)
+ os_can_exe(name, NULL, true)
|| (gettail_dir(name) != name
- && os_can_exe((const char_u *)name, NULL, false)));
+ && os_can_exe(name, NULL, false)));
}
typedef struct {
@@ -8573,12 +8573,12 @@ static void f_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static void f_exepath(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
const char *arg = tv_get_string(&argvars[0]);
- char_u *path = NULL;
+ char *path = NULL;
- (void)os_can_exe((const char_u *)arg, &path, true);
+ (void)os_can_exe(arg, &path, true);
rettv->v_type = VAR_STRING;
- rettv->vval.v_string = path;
+ rettv->vval.v_string = (char_u *)path;
}
/// Find a window: When using a Window ID in any tab page, when using a number
@@ -12109,8 +12109,8 @@ static char **tv_to_argv(typval_T *cmd_tv, const char **cmd, bool *executable)
}
const char *arg0 = tv_get_string_chk(TV_LIST_ITEM_TV(tv_list_first(argl)));
- char_u *exe_resolved = NULL;
- if (!arg0 || !os_can_exe((const char_u *)arg0, &exe_resolved, true)) {
+ char *exe_resolved = NULL;
+ if (!arg0 || !os_can_exe(arg0, &exe_resolved, true)) {
if (arg0 && executable) {
*executable = false;
}