diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-07-31 15:55:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 15:55:01 +0200 |
commit | 68ec497d52bc8e93e12c74099ee9826b9469c3be (patch) | |
tree | 7baab4d6c3644125835ffa24ae0948ce4327d393 /src/nvim/fileio.c | |
parent | 86110ec93303a80ea14561d3976214ca27f0be63 (diff) | |
parent | 824a729628950d72834b98faf28d18b7a94eefb2 (diff) | |
download | rneovim-68ec497d52bc8e93e12c74099ee9826b9469c3be.tar.gz rneovim-68ec497d52bc8e93e12c74099ee9826b9469c3be.tar.bz2 rneovim-68ec497d52bc8e93e12c74099ee9826b9469c3be.zip |
Merge pull request #19437 from dundargoc/refactor/char_u-to-char
refactor: replace char_u with char
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 5b8dd35c43..b98984017b 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -710,7 +710,7 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip, fenc_alloced = false; } else { fenc_next = (char *)p_fencs; // try items in 'fileencodings' - fenc = (char *)next_fenc((char_u **)&fenc_next, &fenc_alloced); + fenc = (char *)next_fenc(&fenc_next, &fenc_alloced); } /* @@ -804,7 +804,7 @@ retry: xfree(fenc); } if (fenc_next != NULL) { - fenc = (char *)next_fenc((char_u **)&fenc_next, &fenc_alloced); + fenc = (char *)next_fenc(&fenc_next, &fenc_alloced); } else { fenc = ""; fenc_alloced = false; @@ -2060,7 +2060,7 @@ void set_forced_fenc(exarg_T *eap) /// NULL. /// When *pp is not set to NULL, the result is in allocated memory and "alloced" /// is set to true. -static char_u *next_fenc(char_u **pp, bool *alloced) +static char_u *next_fenc(char **pp, bool *alloced) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET { char_u *p; @@ -2071,13 +2071,13 @@ static char_u *next_fenc(char_u **pp, bool *alloced) *pp = NULL; return (char_u *)""; } - p = (char_u *)vim_strchr((char *)(*pp), ','); + p = (char_u *)vim_strchr((*pp), ','); if (p == NULL) { - r = enc_canonize(*pp); + r = enc_canonize((char_u *)(*pp)); *pp += STRLEN(*pp); } else { - r = vim_strnsave(*pp, (size_t)(p - *pp)); - *pp = p + 1; + r = vim_strnsave((char_u *)(*pp), (size_t)(p - (char_u *)(*pp))); + *pp = (char *)p + 1; p = enc_canonize(r); xfree(r); r = p; @@ -5400,7 +5400,7 @@ int readdir_core(garray_T *gap, const char *path, void *context, CheckItem check os_closedir(&dir); if (gap->ga_len > 0) { - sort_strings((char_u **)gap->ga_data, gap->ga_len); + sort_strings(gap->ga_data, gap->ga_len); } return OK; |