aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-26 18:58:45 +0100
committerGitHub <noreply@github.com>2022-11-26 18:58:45 +0100
commit019c8805e514428c0b999583f5aec8c9f4eb96d0 (patch)
tree1a105862628c997b46725b4f3f485bd074332cce /src/nvim/path.c
parent319fbffc94896dd9cf0a77891d69b7fcada1fad4 (diff)
parentbd22585061b66d7f71d4832b4a81e950b3c9d19d (diff)
downloadrneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.gz
rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.tar.bz2
rneovim-019c8805e514428c0b999583f5aec8c9f4eb96d0.zip
Merge pull request #20196 from dundargoc/refactor/char_u/14
refactor: replace char_u with char 14: remove `STRLEN` part final
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 49deb821be..b912020ea5 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1521,7 +1521,7 @@ void simplify_filename(char_u *filename)
// At this point "p" is pointing to the char following a single "/"
// or "p" is at the "start" of the (absolute or relative) path name.
if (vim_ispathsep(*p)) {
- STRMOVE(p, p + 1); // remove duplicate "/"
+ STRMOVE(p, (char *)p + 1); // remove duplicate "/"
} else if (p[0] == '.'
&& (vim_ispathsep(p[1]) || p[1] == NUL)) {
if (p == start && relative) {
@@ -1539,7 +1539,7 @@ void simplify_filename(char_u *filename)
} else if (p > start) {
p--; // strip preceding path separator
}
- STRMOVE(p, tail);
+ STRMOVE(p, (char *)tail);
}
} else if (p[0] == '.' && p[1] == '.'
&& (vim_ispathsep(p[2]) || p[2] == NUL)) {
@@ -1638,16 +1638,16 @@ void simplify_filename(char_u *filename)
if (p > start && tail[-1] == '.') {
p--;
}
- STRMOVE(p, tail); // strip previous component
+ STRMOVE(p, (char *)tail); // strip previous component
}
components--;
}
} else if (p == start && !relative) { // leading "/.." or "/../"
- STRMOVE(p, tail); // strip ".." or "../"
+ STRMOVE(p, (char *)tail); // strip ".." or "../"
} else {
if (p == start + 2 && p[-2] == '.') { // leading "./../"
- STRMOVE(p - 2, p); // strip leading "./"
+ STRMOVE(p - 2, (char *)p); // strip leading "./"
tail -= 2;
}
p = tail; // skip to char after ".." or "../"