aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-11-16 20:27:59 +0100
committerGitHub <noreply@github.com>2021-11-16 20:27:59 +0100
commiteba317d7a907a76e6e265c0fe0b97a87f17cf943 (patch)
tree21edca825d0de28a4024c969e26ecfe75f6dc298 /src/nvim/path.c
parent99211b008c10561560e84eabfaa22e1577ac179a (diff)
downloadrneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.tar.gz
rneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.tar.bz2
rneovim-eba317d7a907a76e6e265c0fe0b97a87f17cf943.zip
refactor: reduce number of explicit char casts (#16077)
* refactor: reduce number of explicit char casts
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 1085f7a10c..c28d848683 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -65,7 +65,7 @@ FileComparison path_full_compare(char_u *const s1, char_u *const s2, const bool
if (expandenv) {
expand_env(s1, exp1, MAXPATHL);
} else {
- xstrlcpy((char *)exp1, (const char *)s1, MAXPATHL);
+ 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);
@@ -2395,9 +2395,9 @@ void path_guess_exepath(const char *argv0, char *buf, size_t bufsize)
if (dir_len + 1 > sizeof(NameBuff)) {
continue;
}
- xstrlcpy((char *)NameBuff, dir, dir_len + 1);
- xstrlcat((char *)NameBuff, PATHSEPSTR, sizeof(NameBuff));
- xstrlcat((char *)NameBuff, argv0, sizeof(NameBuff));
+ STRLCPY(NameBuff, dir, dir_len + 1);
+ STRLCAT(NameBuff, PATHSEPSTR, sizeof(NameBuff));
+ STRLCAT(NameBuff, argv0, sizeof(NameBuff));
if (os_can_exe((char *)NameBuff, NULL, false)) {
xstrlcpy(buf, (char *)NameBuff, bufsize);
return;