aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-01-09 14:13:06 +0100
committerGitHub <noreply@github.com>2023-01-09 21:13:06 +0800
commit149209400383c673fdb4fdd1c9a7639139f17936 (patch)
treed2c4e5fa69fc302ec3050978a303f6a479f30291 /src/nvim/cmdexpand.c
parentfc2cd28547954e64ef429c83733f06fa3ee75d50 (diff)
downloadrneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.gz
rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.bz2
rneovim-149209400383c673fdb4fdd1c9a7639139f17936.zip
refactor: replace char_u with char 17 - remove STRLCPY (#21235)
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 1fa9937fb2..a1030389a9 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -1162,7 +1162,7 @@ char *addstar(char *fname, size_t len, int context)
}
} else {
retval = xmalloc(len + 4);
- STRLCPY(retval, fname, len + 1);
+ xstrlcpy(retval, fname, len + 1);
// Don't add a star to *, ~, ~user, $var or `cmd`.
// * would become **, which walks the whole tree.
@@ -2650,10 +2650,10 @@ static void expand_shellcmd(char *filepat, int *num_file, char ***file, int flag
if (l > MAXPATHL - 5) {
break;
}
- STRLCPY(buf, s, l + 1);
+ xstrlcpy(buf, s, l + 1);
add_pathsep(buf);
l = strlen(buf);
- STRLCPY(buf + l, pat, MAXPATHL - l);
+ xstrlcpy(buf + l, pat, MAXPATHL - l);
// Expand matches in one directory of $PATH.
ret = expand_wildcards(1, &buf, num_file, file, flags);