diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-03-22 11:45:48 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-03-22 11:45:48 +0100 |
commit | 4bc62c76c70b86400f60d6c7de98d271b664bec2 (patch) | |
tree | b87ff48d46eebd7c0361bce135f3a7e0420920b8 /src/nvim/ex_getln.c | |
parent | 4fc0291c730f3c42df4692dd91b09cfd806479d7 (diff) | |
parent | 44b563409e8c67d4116ff2e2b726cda4e4dc03f6 (diff) | |
download | rneovim-4bc62c76c70b86400f60d6c7de98d271b664bec2.tar.gz rneovim-4bc62c76c70b86400f60d6c7de98d271b664bec2.tar.bz2 rneovim-4bc62c76c70b86400f60d6c7de98d271b664bec2.zip |
Merge #2184: Fix coverity issues. (6)
Reviewed-by: oni-link <knil.ino@gmail.com>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index d5f7a218f4..238beebf3e 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -10,6 +10,7 @@ * ex_getln.c: Functions for entering and editing an Ex command line. */ +#include <assert.h> #include <errno.h> #include <stdbool.h> #include <string.h> @@ -3858,8 +3859,10 @@ expand_shellcmd ( STRLCPY(buf + l, pat, MAXPATHL - l); /* Expand matches in one directory of $PATH. */ + char_u **prev_file = *file; ret = expand_wildcards(1, &buf, num_file, file, flags); if (ret == OK) { + assert(*file != prev_file); ga_grow(&ga, *num_file); { for (i = 0; i < *num_file; ++i) { |