diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-26 23:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 23:23:44 +0200 |
commit | 3b0df1780e2c8526bda5dead18ee7cc45925caba (patch) | |
tree | c8415dc986f1cd3ddf6044b4ec0318a089db3ed7 /src/nvim/file_search.c | |
parent | 7d0479c55810af9bf9f115ba69d1419ea81ec41e (diff) | |
download | rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.gz rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.bz2 rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.zip |
refactor: uncrustify
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r-- | src/nvim/file_search.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index 4f6c3b1918..9c112f2344 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -576,9 +576,9 @@ char *vim_findfile(void *search_ctx_arg) } // upward search loop - for (;;) { + while (true) { // downward search loop - for (;;) { + while (true) { // check if user wants to stop the search os_breakcheck(); if (got_int) { @@ -780,7 +780,7 @@ char *vim_findfile(void *search_ctx_arg) } else { suf = curbuf->b_p_sua; } - for (;;) { + while (true) { // if file exists and we didn't already find it if ((path_with_url(file_path) || (os_path_exists(file_path) @@ -1419,7 +1419,7 @@ char *find_file_in_path_option(char *ptr, size_t len, int options, int first, ch // When the file doesn't exist, try adding parts of 'suffixesadd'. buf = suffixes; - for (;;) { + while (true) { if ((os_path_exists(NameBuff) && (find_what == FINDFILE_BOTH || ((find_what == FINDFILE_DIR) @@ -1446,7 +1446,7 @@ char *find_file_in_path_option(char *ptr, size_t len, int options, int first, ch did_findfile_init = false; } - for (;;) { + while (true) { if (did_findfile_init) { file_name = vim_findfile(*search_ctx); if (file_name != NULL) { |