aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/file_search.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-24 22:49:25 +0100
committerLewis Russell <lewis6991@gmail.com>2022-08-25 13:10:41 +0100
commit93f24403f8cc760ff47979c596976b53a8b16358 (patch)
tree93d2d2879aba8d563fde484d1fae5864b18134bc /src/nvim/file_search.c
parent1b29288709e75064b9188420d46e1028d7ee341e (diff)
downloadrneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.gz
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.bz2
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.zip
refactor: pre-incr to post-incr
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r--src/nvim/file_search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c
index 2d09e7aa71..53f87d0e42 100644
--- a/src/nvim/file_search.c
+++ b/src/nvim/file_search.c
@@ -1429,7 +1429,7 @@ char_u *find_file_in_path_option(char_u *ptr, size_t len, int options, int first
ff_file_to_find = vim_strsave(NameBuff);
if (options & FNAME_UNESC) {
// Change all "\ " to " ".
- for (ptr = ff_file_to_find; *ptr != NUL; ++ptr) {
+ for (ptr = ff_file_to_find; *ptr != NUL; ptr++) {
if (ptr[0] == '\\' && ptr[1] == ' ') {
memmove(ptr, ptr + 1, STRLEN(ptr));
}
@@ -1466,7 +1466,7 @@ char_u *find_file_in_path_option(char_u *ptr, size_t len, int options, int first
/* When FNAME_REL flag given first use the directory of the file.
* Otherwise or when this fails use the current directory. */
- for (int run = 1; run <= 2; ++run) {
+ for (int run = 1; run <= 2; run++) {
size_t l = STRLEN(ff_file_to_find);
if (run == 1
&& rel_to_curdir