aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-29 15:48:42 +0800
committerGitHub <noreply@github.com>2023-06-29 15:48:42 +0800
commitaa362a2af8ce353d7082834a54bcc124ebd2a026 (patch)
treebafb18698aa5934574d5d31e26e9871667b1d146 /src/nvim/path.c
parent7d0a23973b7d0804089e3bfeb2372f4b818d6046 (diff)
downloadrneovim-aa362a2af8ce353d7082834a54bcc124ebd2a026.tar.gz
rneovim-aa362a2af8ce353d7082834a54bcc124ebd2a026.tar.bz2
rneovim-aa362a2af8ce353d7082834a54bcc124ebd2a026.zip
refactor: remove some casts to char * (#24200)
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index ea0d5a8be1..0927a3a102 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1810,7 +1810,7 @@ bool path_with_extension(const char *path, const char *extension)
}
/// Return true if "name" is a full (absolute) path name or URL.
-bool vim_isAbsName(char *name)
+bool vim_isAbsName(const char *name)
{
return path_with_url(name) != 0 || path_is_absolute(name);
}
@@ -1871,7 +1871,7 @@ char *fix_fname(const char *fname)
#ifdef UNIX
return FullName_save(fname, true);
#else
- if (!vim_isAbsName((char *)fname)
+ if (!vim_isAbsName(fname)
|| strstr(fname, "..") != NULL
|| strstr(fname, "//") != NULL
# ifdef BACKSLASH_IN_FILENAME