aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-05-28 23:10:01 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-06-16 01:31:36 -0300
commitab016d3dbd97bfba0493f1ee083fe4690cb21b81 (patch)
tree864c4820e9c275dac22bdde512621369048b83fe
parent9e7d06da412a2a1481d71e369f6b95c44e9a3e7f (diff)
downloadrneovim-ab016d3dbd97bfba0493f1ee083fe4690cb21b81.tar.gz
rneovim-ab016d3dbd97bfba0493f1ee083fe4690cb21b81.tar.bz2
rneovim-ab016d3dbd97bfba0493f1ee083fe4690cb21b81.zip
No OOM in expand_shellcmd()
-rw-r--r--src/nvim/ex_getln.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 96731f6a1a..78f466f497 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3655,8 +3655,10 @@ ExpandFromContext (
return FAIL;
}
- if (xp->xp_context == EXPAND_SHELLCMD)
- return expand_shellcmd(pat, num_file, file, flags);
+ if (xp->xp_context == EXPAND_SHELLCMD) {
+ expand_shellcmd(pat, num_file, file, flags);
+ return OK;
+ }
if (xp->xp_context == EXPAND_OLD_SETTING)
return ExpandOldSetting(num_file, file);
if (xp->xp_context == EXPAND_BUFFERS)
@@ -3836,9 +3838,8 @@ int ExpandGeneric(
/*
* Complete a shell command.
- * Returns FAIL or OK;
*/
-static int
+static void
expand_shellcmd (
char_u *filepat, /* pattern to match with command names */
int *num_file, /* return: number of matches */
@@ -3926,7 +3927,6 @@ expand_shellcmd (
free(pat);
if (mustfree)
free(path);
- return OK;
}
/*