aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-05-09 11:49:32 +0200
committerDundar Goc <gocdundar@gmail.com>2022-05-16 13:27:06 +0200
commitf0148de7907ec297647816d51c79745be729439e (patch)
tree1aaaa4bbb1cff930178e05dd8b0f72482db166e6 /src/nvim/diff.c
parent7adecbcd29e17b71bf43e50a444724da184c04a7 (diff)
downloadrneovim-f0148de7907ec297647816d51c79745be729439e.tar.gz
rneovim-f0148de7907ec297647816d51c79745be729439e.tar.bz2
rneovim-f0148de7907ec297647816d51c79745be729439e.zip
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index dcc9b51431..e8d54d7030 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1160,7 +1160,7 @@ void ex_diffpatch(exarg_T *eap)
{
char_u *buf = NULL;
win_T *old_curwin = curwin;
- char_u *newname = NULL; // name of patched file buffer
+ char *newname = NULL; // name of patched file buffer
char_u *esc_name = NULL;
#ifdef UNIX
@@ -1258,7 +1258,7 @@ void ex_diffpatch(exarg_T *eap)
emsg(_("E816: Cannot read patch output"));
} else {
if (curbuf->b_fname != NULL) {
- newname = vim_strnsave(curbuf->b_fname, STRLEN(curbuf->b_fname) + 4);
+ newname = xstrnsave(curbuf->b_fname, STRLEN(curbuf->b_fname) + 4);
STRCAT(newname, ".new");
}
@@ -1279,7 +1279,7 @@ void ex_diffpatch(exarg_T *eap)
if (newname != NULL) {
// do a ":file filename.new" on the patched buffer
- eap->arg = (char *)newname;
+ eap->arg = newname;
ex_file(eap);
// Do filetype detection with the new name.