aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-18 21:51:32 +0100
committerGitHub <noreply@github.com>2019-01-18 21:51:32 +0100
commit8a5c68f6959f8d315adb126ff49fd1970e7e75be (patch)
tree851d1c6533952373e126287b8958ed8a179ec775 /src/nvim/path.c
parent8f9fc1f692292efe63b9e71bb6f6340bccf2b37f (diff)
parente8137d263ee167a148d92ef7368933ee5824c103 (diff)
downloadrneovim-8a5c68f6959f8d315adb126ff49fd1970e7e75be.tar.gz
rneovim-8a5c68f6959f8d315adb126ff49fd1970e7e75be.tar.bz2
rneovim-8a5c68f6959f8d315adb126ff49fd1970e7e75be.zip
Merge #9518 from justinmk/pvs-warnings
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 03de914e4f..7903e3f4f4 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -2039,6 +2039,7 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files,
char_u *ffname;
// check all files in (*files)[]
+ assert(*num_files == 0 || *files != NULL);
for (i = 0; i < *num_files; i++) {
ffname = (char_u *)FullName_save((char *)(*files)[i], false);
assert((*files)[i] != NULL);
@@ -2056,16 +2057,16 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files,
}
}
- /*
- * Move the names where 'suffixes' match to the end.
- */
+ //
+ // Move the names where 'suffixes' match to the end.
+ //
+ assert(*num_files == 0 || *files != NULL);
if (*num_files > 1) {
non_suf_match = 0;
for (i = 0; i < *num_files; i++) {
if (!match_suffix((*files)[i])) {
//
- // Move the name without matching suffix to the front
- // of the list.
+ // Move the name without matching suffix to the front of the list.
//
p = (*files)[i];
for (j = i; j > non_suf_match; j--) {