From 3b0df1780e2c8526bda5dead18ee7cc45925caba Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 26 Apr 2023 23:23:44 +0200 Subject: refactor: uncrustify Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`. --- src/nvim/file_search.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nvim/file_search.c') 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) { -- cgit