aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-28 23:30:21 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-06-16 01:31:37 -0300
commit4667fbcbe79a71ae1e9d9674e31b31d62f3248ff (patch)
treef4ec0f0747d4b5049eff58736b58de867a8a24f8 /src
parent3d10e2e0cb8e40bd04df6fff3548f2ca9d08e46b (diff)
downloadrneovim-4667fbcbe79a71ae1e9d9674e31b31d62f3248ff.tar.gz
rneovim-4667fbcbe79a71ae1e9d9674e31b31d62f3248ff.tar.bz2
rneovim-4667fbcbe79a71ae1e9d9674e31b31d62f3248ff.zip
au_get_grouparg() can't fail, remove error handling
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fileio.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 8b53ab3d31..fc8ff8b987 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -5933,8 +5933,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 +6269,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 +7200,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;