clang/"null passed to nonnull arg": expand_wildcards

This commit is contained in:
Justin M. Keyes
2019-01-13 16:49:07 +01:00
parent 651e82af9f
commit 09d21f6f0b

View File

@@ -2038,12 +2038,11 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files,
if (*p_wig) { if (*p_wig) {
char_u *ffname; char_u *ffname;
// check all filess in (*files)[] // check all files in (*files)[]
for (i = 0; i < *num_files; i++) { for (i = 0; i < *num_files; i++) {
ffname = (char_u *)FullName_save((char *)(*files)[i], false); ffname = (char_u *)FullName_save((char *)(*files)[i], false);
if (ffname == NULL) { // out of memory assert((*files)[i] != NULL);
break; assert(ffname != NULL);
}
if (match_file_list(p_wig, (*files)[i], ffname)) { if (match_file_list(p_wig, (*files)[i], ffname)) {
// remove this matching file from the list // remove this matching file from the list
xfree((*files)[i]); xfree((*files)[i]);