aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-30 23:19:02 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-06-16 01:36:31 -0300
commit81ca5ff126c5c0731b7eb57513f899ac6619073e (patch)
tree63784713d4e3abb32a7bf5a491a8e155171cbbce /src/nvim/fileio.c
parent8234f2839f78009442b4ed7bc0599e6b581d5cf8 (diff)
downloadrneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.tar.gz
rneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.tar.bz2
rneovim-81ca5ff126c5c0731b7eb57513f899ac6619073e.zip
No OOM in enc_canonize()
Fix a `return FAIL` that should be `return NULL` in `enc_locale()`
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index fc8ff8b987..129f1a1de2 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -2087,10 +2087,7 @@ void set_forced_fenc(exarg_T *eap)
{
if (eap->force_enc != 0) {
char_u *fenc = enc_canonize(eap->cmd + eap->force_enc);
-
- if (fenc != NULL)
- set_string_option_direct((char_u *)"fenc", -1,
- fenc, OPT_FREE|OPT_LOCAL, 0);
+ set_string_option_direct((char_u *)"fenc", -1, fenc, OPT_FREE|OPT_LOCAL, 0);
free(fenc);
}
}