aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-05-16 14:24:29 +0200
committerGitHub <noreply@github.com>2022-05-16 14:24:29 +0200
commitb9b5577d6d8e07d1e39020c8fc05f817f2e81c66 (patch)
tree0d4b5f8b4db1ad7b4cd6d93c89d149e9e2d84570 /src/nvim/diff.c
parent14d653b421d3ee4e0d641e45e67dafe43809e502 (diff)
parentf0148de7907ec297647816d51c79745be729439e (diff)
downloadrneovim-b9b5577d6d8e07d1e39020c8fc05f817f2e81c66.tar.gz
rneovim-b9b5577d6d8e07d1e39020c8fc05f817f2e81c66.tar.bz2
rneovim-b9b5577d6d8e07d1e39020c8fc05f817f2e81c66.zip
Merge pull request #18578 from dundargoc/refactor/remove-char_u
refactor: remove char_u
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.