diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-16 20:27:25 -0400 |
commit | d199d18159c624844c9c8052d1a98b91084fb803 (patch) | |
tree | 827dd9c4f8f1f6ef73ff1f20a609d08e36640986 /src/nvim/fileio.c | |
parent | 8bbeb4b480a72d0099a18c4d8200313600045231 (diff) | |
parent | e85598e5a91c714c10034b6b3986a666065d1078 (diff) | |
download | rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.gz rneovim-d199d18159c624844c9c8052d1a98b91084fb803.tar.bz2 rneovim-d199d18159c624844c9c8052d1a98b91084fb803.zip |
Merge #787 'removal of redundant OOM error handling'
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 8b53ab3d31..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); } } @@ -5933,8 +5930,6 @@ void do_autocmd(char_u *arg, int forceit) * Check for a legal group name. If not, use AUGROUP_ALL. */ group = au_get_grouparg(&arg); - if (arg == NULL) /* out of memory */ - return; /* * Scan over the events. @@ -6271,8 +6266,6 @@ do_doautocmd ( * Check for a legal group name. If not, use AUGROUP_ALL. */ group = au_get_grouparg(&arg); - if (arg == NULL) /* out of memory */ - return FAIL; if (*arg == '*') { EMSG(_("E217: Can't execute autocommands for ALL events")); @@ -7204,8 +7197,7 @@ set_context_in_autocmd ( include_groups = FALSE; p = arg; group = au_get_grouparg(&arg); - if (group == AUGROUP_ERROR) - return NULL; + /* If there only is a group name that's what we expand. */ if (*arg == NUL && group != AUGROUP_ALL && !vim_iswhite(arg[-1])) { arg = p; |