aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-07 02:29:30 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-07 17:27:59 -0500
commitf1fdeaf667033751378f6e1e29a6039e15de503e (patch)
tree481a0e1491a2e82bcdbd40160d4303c453381402 /src/nvim/fileio.c
parenta7d9df996dc1c353574845563216dc0372dd8b77 (diff)
downloadrneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.tar.gz
rneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.tar.bz2
rneovim-f1fdeaf667033751378f6e1e29a6039e15de503e.zip
option: use char* for set_string_option_direct()
"name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index a542bb19dd..b240e7b134 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1644,8 +1644,7 @@ failed:
save_file_ff(curbuf);
// If editing a new file: set 'fenc' for the current buffer.
// Also for ":read ++edit file".
- set_string_option_direct((char_u *)"fenc", -1, fenc,
- OPT_FREE | OPT_LOCAL, 0);
+ set_string_option_direct("fenc", -1, fenc, OPT_FREE | OPT_LOCAL, 0);
}
if (fenc_alloced)
xfree(fenc);
@@ -2002,7 +2001,7 @@ void set_forced_fenc(exarg_T *eap)
{
if (eap->force_enc != 0) {
char_u *fenc = enc_canonize(eap->cmd + eap->force_enc);
- set_string_option_direct((char_u *)"fenc", -1, fenc, OPT_FREE|OPT_LOCAL, 0);
+ set_string_option_direct("fenc", -1, fenc, OPT_FREE|OPT_LOCAL, 0);
xfree(fenc);
}
}