diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-04-22 21:19:47 +0200 |
---|---|---|
committer | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-04-22 21:19:47 +0200 |
commit | 98fb53e0ebaf1481e93427d9969086eb87faa654 (patch) | |
tree | b04c67f77f9276056c8e6e8e63316ed335a91d29 /src | |
parent | e6b8893337f843d685b26f59d1982e23871956bf (diff) | |
download | rneovim-98fb53e0ebaf1481e93427d9969086eb87faa654.tar.gz rneovim-98fb53e0ebaf1481e93427d9969086eb87faa654.tar.bz2 rneovim-98fb53e0ebaf1481e93427d9969086eb87faa654.zip |
Happy little, happy little, happy little linter
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/path.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index f2b0662eac..29ff62ef77 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1946,18 +1946,20 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files, if (*p_wig) { char_u *ffname; - /* check all filess in (*files)[] */ - for (i = 0; i < *num_files; ++i) { - ffname = (char_u *)FullName_save((char *)(*files)[i], FALSE); - if (ffname == NULL) /* out of memory */ + // check all filess in (*files)[] + for (i = 0; i < *num_files; i++) { + ffname = (char_u *)FullName_save((char *)(*files)[i], false); + if (ffname == NULL) { // out of memory break; + } if (match_file_list(p_wig, (*files)[i], ffname)) { - /* remove this matching files from the list */ + // remove this matching files from the list xfree((*files)[i]); - for (j = i; j + 1 < *num_files; ++j) + for (j = i; j + 1 < *num_files; j++) { (*files)[j] = (*files)[j + 1]; - --*num_files; - --i; + } + (*num_files)--; + i--; } xfree(ffname); } @@ -1968,15 +1970,16 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files, */ if (*num_files > 1) { non_suf_match = 0; - for (i = 0; i < *num_files; ++i) { + 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) + for (j = i; j > non_suf_match; j--) { (*files)[j] = (*files)[j - 1]; + } (*files)[non_suf_match++] = p; } } |