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/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index d1c93733c0..c63ab804af 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1403,7 +1403,7 @@ int do_buffer(int action, int start, int dir, int count, int forceit) if (buf == NULL) { // No previous buffer, Try 2'nd approach forward = true; buf = curbuf->b_next; - for (;;) { + while (true) { if (buf == NULL) { if (!forward) { // tried both directions break; @@ -2241,7 +2241,7 @@ int buflist_findpat(const char *pattern, const char *pattern_end, bool unlisted, // First try finding a listed buffer. If not found and "unlisted" // is true, try finding an unlisted buffer. find_listed = true; - for (;;) { + while (true) { for (attempt = 0; attempt <= 3; attempt++) { // may add '^' and '$' if (toggledollar) { @@ -3180,7 +3180,7 @@ void fileinfo(int fullname, int shorthelp, int dont_truncate) bool dontwrite = bt_dontwrite(curbuf); vim_snprintf_add(buffer, IOSIZE, "\"%s%s%s%s%s%s", curbufIsChanged() - ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", + ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", (curbuf->b_flags & BF_NOTEDITED) && !dontwrite ? _("[Not edited]") : "", (curbuf->b_flags & BF_NEW) && !dontwrite @@ -3609,7 +3609,7 @@ void ex_buffer_all(exarg_T *eap) if (had_tab > 0) { goto_tabpage_tp(first_tabpage, true, true); } - for (;;) { + while (true) { tpnext = curtab->tp_next; for (wp = firstwin; wp != NULL; wp = wpnext) { wpnext = wp->w_next; -- cgit