aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/memfile.c')
-rw-r--r--src/nvim/memfile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/memfile.c b/src/nvim/memfile.c
index 9446aaee4f..bb9be0766e 100644
--- a/src/nvim/memfile.c
+++ b/src/nvim/memfile.c
@@ -170,7 +170,7 @@ void mf_close(memfile_T *mfp, bool del_file)
emsg(_(e_swapclose));
}
if (del_file && mfp->mf_fname != NULL) {
- os_remove((char *)mfp->mf_fname);
+ os_remove(mfp->mf_fname);
}
// free entries in used list
@@ -210,7 +210,7 @@ void mf_close_file(buf_T *buf, bool getlines)
mfp->mf_fd = -1;
if (mfp->mf_fname != NULL) {
- os_remove((char *)mfp->mf_fname); // delete the swap file
+ os_remove(mfp->mf_fname); // delete the swap file
mf_free_fnames(mfp);
}
}
@@ -751,8 +751,8 @@ void mf_free_fnames(memfile_T *mfp)
/// name so we must work out the full path name.
void mf_set_fnames(memfile_T *mfp, char *fname)
{
- mfp->mf_fname = (char_u *)fname;
- mfp->mf_ffname = (char_u *)FullName_save((char *)mfp->mf_fname, false);
+ mfp->mf_fname = fname;
+ mfp->mf_ffname = (char_u *)FullName_save(mfp->mf_fname, false);
}
/// Make name of memfile's swapfile a full path.
@@ -762,7 +762,7 @@ void mf_fullname(memfile_T *mfp)
{
if (mfp != NULL && mfp->mf_fname != NULL && mfp->mf_ffname != NULL) {
xfree(mfp->mf_fname);
- mfp->mf_fname = mfp->mf_ffname;
+ mfp->mf_fname = (char *)mfp->mf_ffname;
mfp->mf_ffname = NULL;
}
}
@@ -789,7 +789,7 @@ static bool mf_do_open(memfile_T *mfp, char *fname, int flags)
/// exist yet. If there is a symbolic link, this is most likely an attack.
FileInfo file_info;
if ((flags & O_CREAT)
- && os_fileinfo_link((char *)mfp->mf_fname, &file_info)) {
+ && os_fileinfo_link(mfp->mf_fname, &file_info)) {
mfp->mf_fd = -1;
emsg(_("E300: Swap file already exists (symlink attack?)"));
} else {