diff options
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/buffer.c | 2 | ||||
-rw-r--r-- | src/nvim/eval/encode.c | 4 | ||||
-rw-r--r-- | src/nvim/eval/funcs.c | 16 | ||||
-rw-r--r-- | src/nvim/eval/typval.c | 2 | ||||
-rw-r--r-- | src/nvim/eval/userfunc.c | 4 | ||||
-rw-r--r-- | src/nvim/eval/vars.c | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/nvim/eval/buffer.c b/src/nvim/eval/buffer.c index d9cc18a402..aad88619b7 100644 --- a/src/nvim/eval/buffer.c +++ b/src/nvim/eval/buffer.c @@ -172,7 +172,7 @@ static void set_buffer_lines(buf_T *buf, linenr_T lnum_arg, bool append, typval_ } // Default result is zero == OK. - for (;;) { + while (true) { if (lines->v_type == VAR_LIST) { // List argument, get next string. if (li == NULL) { diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index b056a1784c..be0cf79e85 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -418,7 +418,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf, const s ga_concat(gap, "v:null") #define TYPVAL_ENCODE_CONV_BOOL(tv, num) \ - ga_concat(gap, ((num)? "v:true": "v:false")) + ga_concat(gap, ((num) ? "v:true" : "v:false")) #define TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER(tv, num) @@ -544,7 +544,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf, const s #undef TYPVAL_ENCODE_CONV_BOOL #define TYPVAL_ENCODE_CONV_BOOL(tv, num) \ - ga_concat(gap, ((num)? "true": "false")) + ga_concat(gap, ((num) ? "true" : "false")) #undef TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER #define TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER(tv, num) \ diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 5c9d39b91f..91f78b8ed6 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -643,7 +643,7 @@ static void f_chansend(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) bool crlf = false; #else Channel *chan = find_channel(id); - bool crlf = (chan != NULL && chan->term) ? true: false; + bool crlf = (chan != NULL && chan->term) ? true : false; #endif if (argvars[1].v_type == VAR_BLOB) { @@ -4593,7 +4593,7 @@ static void find_some_match(typval_T *const argvars, typval_T *const rettv, if (regmatch.regprog != NULL) { regmatch.rm_ic = p_ic; - for (;;) { + while (true) { if (l != NULL) { if (li == NULL) { match = false; @@ -4960,7 +4960,7 @@ static void msgpackparse_unpack_list(const list_T *const list, list_T *const ret } msgpack_unpacked unpacked; msgpack_unpacked_init(&unpacked); - do { + while (true) { if (!msgpack_unpacker_reserve_buffer(unpacker, IOSIZE)) { emsg(_(e_outofmem)); goto end; @@ -4990,7 +4990,7 @@ static void msgpackparse_unpack_list(const list_T *const list, list_T *const ret if (rlret == OK) { break; } - } while (true); + } end: msgpack_unpacker_free(unpacker); @@ -6026,8 +6026,8 @@ static void f_resolve(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) char *const buf = xmallocz(MAXPATHL); char *cpy; - for (;;) { - for (;;) { + while (true) { + while (true) { len = readlink(p, buf, MAXPATHL); if (len <= 0) { break; @@ -6409,7 +6409,7 @@ static int search_cmn(typval_T *argvars, pos_T *match_pos, int *flagsp) int subpatnum; // Repeat until {skip} returns false. - for (;;) { + while (true) { subpatnum = searchit(curwin, curbuf, &pos, NULL, dir, (char *)pat, 1, options, RE_SEARCH, &sia); // finding the first match again means there is no match where {skip} @@ -6989,7 +6989,7 @@ long do_searchpair(const char *spat, const char *mpat, const char *epat, int dir pos_T foundpos; clearpos(&foundpos); char *pat = pat3; - for (;;) { + while (true) { searchit_arg_T sia = { .sa_stop_lnum = lnum_stop, .sa_tm = &tm, diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 6556e274ab..cf355a22fa 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -1042,7 +1042,7 @@ static int item_compare(const void *s1, const void *s2, bool keep_zero) if (sortinfo->item_compare_lc) { res = strcoll(p1, p2); } else { - res = sortinfo->item_compare_ic ? STRICMP(p1, p2): strcmp(p1, p2); + res = sortinfo->item_compare_ic ? STRICMP(p1, p2) : strcmp(p1, p2); } } else { double n1, n2; diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 854a0732ab..0e22cf54cf 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -2343,7 +2343,7 @@ void ex_function(exarg_T *eap) } // find extra arguments "range", "dict", "abort" and "closure" - for (;;) { + while (true) { p = skipwhite(p); if (strncmp(p, "range", 5) == 0) { flags |= FC_RANGE; @@ -2403,7 +2403,7 @@ void ex_function(exarg_T *eap) indent = 2; nesting = 0; - for (;;) { + while (true) { if (KeyTyped) { msg_scroll = true; saved_wait_return = false; diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index d3ca2624eb..593ba9f6c3 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -220,7 +220,7 @@ static list_T *heredoc_get(exarg_T *eap, char *cmd) char *theline = NULL; list_T *l = tv_list_alloc(0); - for (;;) { + while (true) { int mi = 0; int ti = 0; @@ -502,7 +502,7 @@ const char *skip_var_list(const char *arg, int *var_count, int *semicolon) const char *s; // "[var, var]": find the matching ']'. const char *p = arg; - for (;;) { + while (true) { p = skipwhite(p + 1); // skip whites after '[', ';' or ',' s = skip_var_one(p); if (s == p) { @@ -1012,7 +1012,7 @@ static int do_unlet_var(lval_T *lp, char *name_end, exarg_T *eap, int deep FUNC_ // Delete a range of List items. listitem_T *const first_li = lp->ll_li; listitem_T *last_li = first_li; - for (;;) { + while (true) { listitem_T *const li = TV_LIST_ITEM_NEXT(lp->ll_list, lp->ll_li); if (value_check_lock(TV_LIST_ITEM_TV(lp->ll_li)->v_lock, lp->ll_name, |