refactor: uncrustify

Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
This commit is contained in:
dundargoc
2023-04-26 23:23:44 +02:00
committed by GitHub
parent 7d0479c558
commit 3b0df1780e
94 changed files with 324 additions and 324 deletions

View File

@@ -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,