diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-25 22:35:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 22:35:20 +0200 |
commit | 6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0 (patch) | |
tree | 163d6c0553e6c9f7a91d7d0d97e369722dca75be /src/nvim/path.c | |
parent | bfd1adc62c615e7b65bdfe6d3c21158708eb4314 (diff) | |
parent | 40855b0143a864739a6037921e15699445dcf8a7 (diff) | |
download | rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.gz rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.tar.bz2 rneovim-6e9980fc3b6f8e246632aef0f4b8c0edf30e24f0.zip |
Merge pull request #19628 from dundargoc/refactor/char_u/2
refactor: replace char_u with char
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 3b3156bc73..e4215c89c2 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -376,16 +376,16 @@ int path_fnamencmp(const char *const fname1, const char *const fname2, size_t le const char *p1 = fname1; const char *p2 = fname2; while (len > 0) { - c1 = utf_ptr2char((const char_u *)p1); - c2 = utf_ptr2char((const char_u *)p2); + c1 = utf_ptr2char(p1); + c2 = utf_ptr2char(p2); if ((c1 == NUL || c2 == NUL || (!((c1 == '/' || c1 == '\\') && (c2 == '\\' || c2 == '/')))) && (p_fic ? (c1 != c2 && CH_FOLD(c1) != CH_FOLD(c2)) : c1 != c2)) { break; } - len -= (size_t)utfc_ptr2len((const char_u *)p1); - p1 += utfc_ptr2len((const char_u *)p1); - p2 += utfc_ptr2len((const char_u *)p2); + len -= (size_t)utfc_ptr2len(p1); + p1 += utfc_ptr2len(p1); + p2 += utfc_ptr2len(p2); } return p_fic ? CH_FOLD(c1) - CH_FOLD(c2) : c1 - c2; #else @@ -843,7 +843,7 @@ static bool is_unique(char_u *maybe_unique, garray_T *gap, int i) */ static void expand_path_option(char_u *curdir, garray_T *gap) { - char_u *path_option = *curbuf->b_p_path == NUL ? p_path : curbuf->b_p_path; + char_u *path_option = *curbuf->b_p_path == NUL ? p_path : (char_u *)curbuf->b_p_path; char_u *buf = xmalloc(MAXPATHL); while (*path_option != NUL) { @@ -1684,7 +1684,7 @@ void simplify_filename(char_u *filename) static char *eval_includeexpr(const char *const ptr, const size_t len) { set_vim_var_string(VV_FNAME, ptr, (ptrdiff_t)len); - char *res = eval_to_string_safe((char *)curbuf->b_p_inex, NULL, + char *res = eval_to_string_safe(curbuf->b_p_inex, NULL, was_set_insecurely(curwin, "includeexpr", OPT_LOCAL)); set_vim_var_string(VV_FNAME, NULL, 0); return res; |