mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
refactor: add function xstrnsave
xstrnsave is a clone of vim_strnsave that uses char* instead of char_u*. Its purpose short-term is to help reduce the number of casts and for long-term to replace vim_strnsave as the need to use char_u is eliminated.
This commit is contained in:
@@ -433,7 +433,7 @@ static int cs_add_common(char *arg1, char *arg2, char *flags)
|
||||
if (fname == NULL) {
|
||||
goto add_err;
|
||||
}
|
||||
fname = (char *)vim_strnsave((char_u *)fname, len);
|
||||
fname = xstrnsave(fname, len);
|
||||
xfree(fbuf);
|
||||
FileInfo file_info;
|
||||
bool file_info_ok = os_fileinfo(fname, &file_info);
|
||||
|
Reference in New Issue
Block a user