aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-04-15 19:49:06 +0200
committerDundar Goc <gocdundar@gmail.com>2022-04-16 18:09:26 +0200
commit88270a57358e4009537de9435c19fcb17e66ffdd (patch)
tree87216094e11d56b9058ac23de43238ff3a469ff6 /src/nvim/if_cscope.c
parent7a2fcbbbecc96c0179aa9449a1d4e3b5d936a054 (diff)
downloadrneovim-88270a57358e4009537de9435c19fcb17e66ffdd.tar.gz
rneovim-88270a57358e4009537de9435c19fcb17e66ffdd.tar.bz2
rneovim-88270a57358e4009537de9435c19fcb17e66ffdd.zip
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.
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 9ca01137cf..093ca238f1 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -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);