aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-06-28 11:31:54 +0200
committerGitHub <noreply@github.com>2022-06-28 02:31:54 -0700
commit014a88799a1d175ad121c520c9cc5bd0bb2d8813 (patch)
treedb5d1acdc8ea6fe58f78b1aabc62b3ee5fc7875a /src/nvim/path.c
parent7e1cf6b7642f0ab14656d853d44f4409b2987b9c (diff)
downloadrneovim-014a88799a1d175ad121c520c9cc5bd0bb2d8813.tar.gz
rneovim-014a88799a1d175ad121c520c9cc5bd0bb2d8813.tar.bz2
rneovim-014a88799a1d175ad121c520c9cc5bd0bb2d8813.zip
refactor: replace char_u #18429
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 9859ca7daa..f5c662ca88 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -52,27 +52,27 @@
/// @param checkname When both files don't exist, only compare their names.
/// @param expandenv Whether to expand environment variables in file names.
/// @return Enum of type FileComparison. @see FileComparison.
-FileComparison path_full_compare(char_u *const s1, char_u *const s2, const bool checkname,
+FileComparison path_full_compare(char *const s1, char *const s2, const bool checkname,
const bool expandenv)
{
assert(s1 && s2);
- char_u exp1[MAXPATHL];
- char_u full1[MAXPATHL];
- char_u full2[MAXPATHL];
+ char exp1[MAXPATHL];
+ char full1[MAXPATHL];
+ char full2[MAXPATHL];
FileID file_id_1, file_id_2;
if (expandenv) {
- expand_env(s1, exp1, MAXPATHL);
+ expand_env((char_u *)s1, (char_u *)exp1, MAXPATHL);
} else {
STRLCPY(exp1, s1, MAXPATHL);
}
- bool id_ok_1 = os_fileid((char *)exp1, &file_id_1);
- bool id_ok_2 = os_fileid((char *)s2, &file_id_2);
+ bool id_ok_1 = os_fileid(exp1, &file_id_1);
+ bool id_ok_2 = os_fileid(s2, &file_id_2);
if (!id_ok_1 && !id_ok_2) {
// If os_fileid() doesn't work, may compare the names.
if (checkname) {
- vim_FullName((char *)exp1, (char *)full1, MAXPATHL, false);
- vim_FullName((char *)s2, (char *)full2, MAXPATHL, false);
+ vim_FullName(exp1, full1, MAXPATHL, false);
+ vim_FullName(s2, full2, MAXPATHL, false);
if (FNAMECMP(full1, full2) == 0) {
return kEqualFileNames;
}